|
libzypp 17.38.6
|
A sat capability. More...
#include <zypp/ng/sat/capability.h>
Classes | |
| struct | Matches |
| matches functor. More... | |
Public Types | |
| enum | CtorFlag { PARSED , UNPARSED } |
Public Member Functions | |
| Capability () | |
| Default ctor, Empty capability. | |
| Capability (sat::detail::IdType id_r) | |
| Ctor from id. | |
Ctors parsing a Capability: <tt>"name[.arch] [op edition]"</tt> or <tt>( arch, "name [op edition]")</tt> | |
| Capability (const char *str_r, const ResKind &prefix_r=ResKind(), CtorFlag flag_r=UNPARSED) | |
| Ctor from string. | |
| Capability (const std::string &str_r, const ResKind &prefix_r=ResKind(), CtorFlag flag_r=UNPARSED) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Capability (const Arch &arch_r, const char *str_r, const ResKind &prefix_r=ResKind(), CtorFlag flag_r=UNPARSED) | |
| Capability (const Arch &arch_r, const std::string &str_r, const ResKind &prefix_r=ResKind(), CtorFlag flag_r=UNPARSED) | |
| Capability (const char *str_r, CtorFlag flag_r, const ResKind &prefix_r=ResKind()) | |
| Capability (const std::string &str_r, CtorFlag flag_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Capability (const Arch &arch_r, const char *str_r, CtorFlag flag_r, const ResKind &prefix_r=ResKind()) | |
| Capability (const Arch &arch_r, const std::string &str_r, CtorFlag flag_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Ctors parsing a broken down Capability: <tt>( "name[.arch]", op, edition )</tt> | |
| Capability (const std::string &name_r, const std::string &op_r, const std::string &ed_r, const ResKind &prefix_r=ResKind()) | |
| Ctor from name[.arch] op edition. | |
| Capability (const std::string &name_r, Rel op_r, const std::string &ed_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Capability (const std::string &name_r, Rel op_r, const Edition &ed_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Ctors taking a broken down Capability: <tt>( arch, name, op, edition )</tt> | |
| Capability (const std::string &arch_r, const std::string &name_r, const std::string &op_r, const std::string &ed_r, const ResKind &prefix_r=ResKind()) | |
| Ctor from arch name op edition. | |
| Capability (const std::string &arch_r, const std::string &name_r, Rel op_r, const std::string &ed_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Capability (const std::string &arch_r, const std::string &name_r, Rel op_r, const Edition &ed_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Capability (const Arch &arch_r, const std::string &name_r, const std::string &op_r, const std::string &ed_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Capability (const Arch &arch_r, const std::string &name_r, Rel op_r, const std::string &ed_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| Capability (const Arch &arch_r, const std::string &name_r, Rel op_r, const Edition &ed_r, const ResKind &prefix_r=ResKind()) | |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
Ctor creating a namespace: capability. | |
An empty value_r (std::string or IdString) will also be mapped to IdString::Null, creating a namespace: capability which in most contexts matches all members of this namespace. | |
| Capability (ResolverNamespace namespace_r, IdString value_r=IdString::Null) | |
| Capability (ResolverNamespace namespace_r, const char *value_r) | |
| Capability (ResolverNamespace namespace_r, const std::string &value_r) | |
Ctor for creating expressions | |
| enum | CapRel { CAP_AND = 16 , CAP_OR = 17 , CAP_COND = 22 , CAP_UNLESS = 29 , CAP_ELSE = 26 , CAP_WITH = 18 , CAP_WITHOUT = 28 , CAP_NAMESPACE = 19 , CAP_ARCH = 20 } |
| Enum values correspond with libsolv defines. More... | |
| static const Capability | Null |
No or Null Capability ( Id 0 ). | |
| static const Capability | Empty |
| Empty Capability. | |
| Capability (CapRel rel_r, const Capability &lhs_r, const Capability &rhs_r) | |
| operator bool () const | |
| Evaluate in a boolean context ( !
| |
| bool | empty () const |
| Whether the Capability is empty. | |
| const char * | c_str () const |
| Conversion to const char *. | |
| std::string | asString () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| CapDetail | detail () const |
| Helper providing more detailed information about a Capability. | |
Match two simple capabilities. | |
Two simple capabilities match if they have the same Where no edition matches ANY edition.
If a capability expression is involved, matches returns CapMatch::irrelevant. | |
| sat::detail::IdType | _id |
| CapMatch | matches (const Capability &rhs) const |
| CapMatch | matches (const IdString &rhs) const |
| CapMatch | matches (const std::string &rhs) const |
| CapMatch | matches (const char *rhs) const |
| sat::detail::IdType | id () const |
| Expert backdoor. | |
| static CapMatch | matches (const Capability &lhs, const Capability &rhs) |
| static CapMatch | matches (const Capability &lhs, const IdString &rhs) |
| static CapMatch | matches (const Capability &lhs, const std::string &rhs) |
| static CapMatch | matches (const Capability &lhs, const char *rhs) |
| static CapMatch | matches (const IdString &lhs, const Capability &rhs) |
| static CapMatch | matches (const IdString &lhs, const IdString &rhs) |
| static CapMatch | matches (const IdString &lhs, const std::string &rhs) |
| static CapMatch | matches (const IdString &lhs, const char *rhs) |
| static CapMatch | matches (const std::string &lhs, const Capability &rhs) |
| static CapMatch | matches (const std::string &lhs, const IdString &rhs) |
| static CapMatch | matches (const std::string &lhs, const std::string &rhs) |
| static CapMatch | matches (const std::string &lhs, const char *rhs) |
| static CapMatch | matches (const char *lhs, const Capability &rhs) |
| static CapMatch | matches (const char *lhs, const IdString &rhs) |
| static CapMatch | matches (const char *lhs, const std::string &rhs) |
| static CapMatch | matches (const char *lhs, const char *rhs) |
| static bool | isInterestingFileSpec (const IdString &name_r) |
| Test for a filename that is likely being REQUIRED. | |
| static bool | isInterestingFileSpec (const std::string &name_r) |
| static bool | isInterestingFileSpec (const char *name_r) |
| static CapMatch | _doMatch (sat::detail::IdType lhs, sat::detail::IdType rhs) |
| Match two Capabilities. | |
A sat capability.
A Capability: "name[.arch] [op edition]" or a richdep[1]
If a certain ResKind is specified upon construction, the capabilities name part is prefixed, unless it already contains a well known kind spec. If no ResKind is specified, it's assumed you refer to a package or the name is already prefixed:
[1] https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.html
IdType integer — an index into the libsolv stringpool, not into any specific solver pool's solvable array. It is therefore intentionally not a PoolMember and calls StringPool::instance() directly in its constructors.Contrast with Solvable (stores a SolvableIdType — index into a specific pool's solvable array) and Repository (stores a CRepo* — pool-specific pointer), which are solver-pool-bound.
Definition at line 73 of file capability.h.
| Enumerator | |
|---|---|
| PARSED | |
| UNPARSED | |
Definition at line 76 of file capability.h.
Enum values correspond with libsolv defines.
| Enumerator | |
|---|---|
| CAP_AND |
|
| CAP_OR |
|
| CAP_COND |
|
| CAP_UNLESS |
|
| CAP_ELSE |
|
| CAP_WITH |
|
| CAP_WITHOUT |
|
| CAP_NAMESPACE | |
| CAP_ARCH | Used internally. |
Definition at line 161 of file capability.h.
|
inline |
Default ctor, Empty capability.
Definition at line 80 of file capability.h.
|
inlineexplicit |
Ctor from id.
Definition at line 83 of file capability.h.
|
explicit |
Ctor from string.
str_r is parsed to see if it forms a richdep. Subsequent arguments are meaningless in that case. If it's no richdep we continue as described below.
str_r is parsed to check whether it contains an [op edition] part, unless the PARSED flag is passed to the ctor. In that case "name[.arch]" is assumed.
Capability legacy is to parse everything unknown into a NAMED cap. This is often used to turn user supplied search strings with an optional edition range restriction into PoolQuery arguments ('/gcc[0-9]+/ >= 8').
Definition at line 261 of file capability.cc.
|
explicit |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 265 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const Arch & | arch_r, |
| const char * | str_r, | ||
| const ResKind & | prefix_r = ResKind(), | ||
| CtorFlag | flag_r = UNPARSED ) |
Definition at line 269 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const Arch & | arch_r, |
| const std::string & | str_r, | ||
| const ResKind & | prefix_r = ResKind(), | ||
| CtorFlag | flag_r = UNPARSED ) |
Definition at line 273 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const char * | str_r, |
| CtorFlag | flag_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
Definition at line 277 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const std::string & | str_r, |
| CtorFlag | flag_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 281 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const Arch & | arch_r, |
| const char * | str_r, | ||
| CtorFlag | flag_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
Definition at line 285 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const Arch & | arch_r, |
| const std::string & | str_r, | ||
| CtorFlag | flag_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 289 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const std::string & | name_r, |
| const std::string & | op_r, | ||
| const std::string & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
Ctor from name[.arch] op edition.
Definition at line 297 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const std::string & | name_r, |
| Rel | op_r, | ||
| const std::string & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 300 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const std::string & | name_r, |
| Rel | op_r, | ||
| const Edition & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 303 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const std::string & | arch_r, |
| const std::string & | name_r, | ||
| const std::string & | op_r, | ||
| const std::string & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
Ctor from arch name op edition.
Definition at line 311 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const std::string & | arch_r, |
| const std::string & | name_r, | ||
| Rel | op_r, | ||
| const std::string & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 314 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const std::string & | arch_r, |
| const std::string & | name_r, | ||
| Rel | op_r, | ||
| const Edition & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 317 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const Arch & | arch_r, |
| const std::string & | name_r, | ||
| const std::string & | op_r, | ||
| const std::string & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 320 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const Arch & | arch_r, |
| const std::string & | name_r, | ||
| Rel | op_r, | ||
| const std::string & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 323 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | const Arch & | arch_r, |
| const std::string & | name_r, | ||
| Rel | op_r, | ||
| const Edition & | ed_r, | ||
| const ResKind & | prefix_r = ResKind() ) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 326 of file capability.cc.
| zyppng::sat::Capability::Capability | ( | ResolverNamespace | namespace_r, |
| IdString | value_r = IdString::Null ) |
Definition at line 338 of file capability.cc.
|
inline |
Definition at line 153 of file capability.h.
|
inline |
Definition at line 154 of file capability.h.
| zyppng::sat::Capability::Capability | ( | Capability::CapRel | rel_r, |
| const Capability & | lhs_r, | ||
| const Capability & | rhs_r ) |
Definition at line 330 of file capability.cc.
|
inlineexplicit |
|
inline |
Whether the Capability is empty.
This is true for Null and Empty.
Definition at line 195 of file capability.h.
| const char * zyppng::sat::Capability::c_str | ( | ) | const |
Conversion to const char *.
Definition at line 342 of file capability.cc.
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 203 of file capability.h.
|
inline |
Helper providing more detailed information about a Capability.
Definition at line 414 of file capability.h.
|
inlinestatic |
Definition at line 221 of file capability.h.
|
inlinestatic |
Definition at line 222 of file capability.h.
|
inlinestatic |
Definition at line 223 of file capability.h.
|
inlinestatic |
Definition at line 224 of file capability.h.
|
inlinestatic |
Definition at line 226 of file capability.h.
|
inlinestatic |
Definition at line 227 of file capability.h.
|
inlinestatic |
Definition at line 228 of file capability.h.
Definition at line 229 of file capability.h.
|
inlinestatic |
Definition at line 231 of file capability.h.
|
inlinestatic |
Definition at line 232 of file capability.h.
|
inlinestatic |
Definition at line 233 of file capability.h.
|
inlinestatic |
Definition at line 234 of file capability.h.
|
inlinestatic |
Definition at line 236 of file capability.h.
Definition at line 237 of file capability.h.
|
inlinestatic |
Definition at line 238 of file capability.h.
|
inlinestatic |
Definition at line 239 of file capability.h.
|
inline |
Definition at line 241 of file capability.h.
Definition at line 242 of file capability.h.
|
inline |
Definition at line 243 of file capability.h.
|
inline |
Definition at line 244 of file capability.h.
Test for a filename that is likely being REQUIRED.
Files below /bin , /sbin , /lib etc. Scanning a packages filelist, an interesting filename might be worth being remembered in PROVIDES.
Definition at line 261 of file capability.h.
|
inlinestatic |
Definition at line 262 of file capability.h.
|
static |
Definition at line 398 of file capability.cc.
|
inline |
Expert backdoor.
Definition at line 301 of file capability.h.
|
staticprivate |
Match two Capabilities.
Definition at line 347 of file capability.cc.
|
static |
No or Null Capability ( Id 0 ).
Definition at line 182 of file capability.h.
|
static |
Empty Capability.
Definition at line 185 of file capability.h.
|
private |
Definition at line 307 of file capability.h.