libzypp 17.31.7
|
A sat capability. More...
#include <Capability.h>
Classes | |
struct | Matches |
matches functor. More... | |
Public Types | |
enum | CtorFlag { PARSED , UNPARSED } |
Public Member Functions | |
Capability () | |
Default ctor, Empty capability. More... | |
Capability (sat::detail::IdType id_r) | |
Ctor from id. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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 . More... | |
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. More... | |
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. More... | |
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 . More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Capability &obj) |
Stream output. More... | |
std::ostream & | dumpOn (std::ostream &str, const Capability &obj) |
Detailed stream output. More... | |
bool | operator== (const Capability &lhs, const Capability &rhs) |
bool | operator!= (const Capability &lhs, const Capability &rhs) |
bool | operator< (const Capability &lhs, const Capability &rhs) |
Arbitrary order. More... | |
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. | |
static const Capability | Null |
No or Null Capability ( Id 0 ). More... | |
static const Capability | Empty |
Empty Capability. More... | |
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) | |
operator bool () const | |
Evaluate in a boolean context ( ! empty() ) . More... | |
bool | empty () const |
Whether the Capability is empty. More... | |
const char * | c_str () const |
Conversion to const char * More... | |
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. More... | |
CapDetail | detail () const |
Helper providing more detailed information about a Capability. More... | |
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. More... | |
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. More... | |
static bool | isInterestingFileSpec (const std::string &name_r) |
static bool | isInterestingFileSpec (const char *name_r) |
static Capability | guessPackageSpec (const std::string &str_r) |
Capability parser also guessing "libzypp-1.2.3-4.5.x86_64" formats. More... | |
static Capability | guessPackageSpec (const std::string &str_r, bool &rewrote_r) |
static CapMatch | _doMatch (sat::detail::IdType lhs, sat::detail::IdType rhs) |
Match two Capabilities. More... | |
Additional Inherited Members | |
![]() | |
static PoolImpl & | myPool () |
A sat capability.
A Capability: "name[.arch] [op edition]"
If a certain ResKind is specified upon construction, the capabilities name part is prefixed, unless it already conatins a well known kind spec. If no ResKind is specified, it's assumed you refer to a package or the name is already prefixed:
Definition at line 59 of file Capability.h.
Enumerator | |
---|---|
PARSED | |
UNPARSED |
Definition at line 62 of file Capability.h.
|
inline |
Default ctor, Empty capability.
Definition at line 66 of file Capability.h.
|
inlineexplicit |
Ctor from id.
Definition at line 69 of file Capability.h.
|
explicit |
Ctor from string.
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.
Definition at line 247 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 251 of file Capability.cc.
zypp::Capability::Capability | ( | const Arch & | arch_r, |
const char * | str_r, | ||
const ResKind & | prefix_r = ResKind() , |
||
CtorFlag | flag_r = UNPARSED |
||
) |
Definition at line 255 of file Capability.cc.
zypp::Capability::Capability | ( | const Arch & | arch_r, |
const std::string & | str_r, | ||
const ResKind & | prefix_r = ResKind() , |
||
CtorFlag | flag_r = UNPARSED |
||
) |
Definition at line 259 of file Capability.cc.
zypp::Capability::Capability | ( | const char * | str_r, |
CtorFlag | flag_r, | ||
const ResKind & | prefix_r = ResKind() |
||
) |
Definition at line 263 of file Capability.cc.
zypp::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 267 of file Capability.cc.
zypp::Capability::Capability | ( | const Arch & | arch_r, |
const char * | str_r, | ||
CtorFlag | flag_r, | ||
const ResKind & | prefix_r = ResKind() |
||
) |
Definition at line 271 of file Capability.cc.
zypp::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 275 of file Capability.cc.
zypp::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 283 of file Capability.cc.
zypp::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 286 of file Capability.cc.
zypp::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 289 of file Capability.cc.
zypp::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 297 of file Capability.cc.
zypp::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 300 of file Capability.cc.
zypp::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 303 of file Capability.cc.
zypp::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 306 of file Capability.cc.
zypp::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 309 of file Capability.cc.
zypp::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 312 of file Capability.cc.
zypp::Capability::Capability | ( | ResolverNamespace | namespace_r, |
IdString | value_r = IdString::Null |
||
) |
Definition at line 320 of file Capability.cc.
|
inline |
Definition at line 132 of file Capability.h.
|
inline |
Definition at line 133 of file Capability.h.
|
inlineexplicit |
Evaluate in a boolean context ( ! empty() )
.
Definition at line 144 of file Capability.h.
|
inline |
Whether the Capability is empty.
This is true for Null and Empty.
Definition at line 150 of file Capability.h.
const char * zypp::Capability::c_str | ( | ) | const |
Conversion to const char *
Definition at line 425 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 158 of file Capability.h.
|
inline |
Helper providing more detailed information about a Capability.
Definition at line 386 of file Capability.h.
|
inlinestatic |
Definition at line 176 of file Capability.h.
|
inlinestatic |
Definition at line 177 of file Capability.h.
|
inlinestatic |
Definition at line 178 of file Capability.h.
|
inlinestatic |
Definition at line 179 of file Capability.h.
|
inlinestatic |
Definition at line 181 of file Capability.h.
|
inlinestatic |
Definition at line 182 of file Capability.h.
|
inlinestatic |
Definition at line 183 of file Capability.h.
Definition at line 184 of file Capability.h.
|
inlinestatic |
Definition at line 186 of file Capability.h.
|
inlinestatic |
Definition at line 187 of file Capability.h.
|
inlinestatic |
Definition at line 188 of file Capability.h.
|
inlinestatic |
Definition at line 189 of file Capability.h.
|
inlinestatic |
Definition at line 191 of file Capability.h.
Definition at line 192 of file Capability.h.
|
inlinestatic |
Definition at line 193 of file Capability.h.
|
inlinestatic |
Definition at line 194 of file Capability.h.
|
inline |
Definition at line 196 of file Capability.h.
Definition at line 197 of file Capability.h.
|
inline |
Definition at line 198 of file Capability.h.
|
inline |
Definition at line 199 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 216 of file Capability.h.
|
inlinestatic |
Definition at line 217 of file Capability.h.
|
static |
Definition at line 488 of file Capability.cc.
|
static |
Capability parser also guessing "libzypp-1.2.3-4.5.x86_64"
formats.
The argument might be in the form "libzypp-devel-1.2.3.x86_64"
. Passed to the Capability ctor, this would correctly be parsed as name capability, because actually the edition part had to be separated by a '='
, and the architecture had to be appended to the name. So this is how it actually had to look like: "libzypp-devel.x86_64=1.2.3"
Obviously we have to guess if, and where to split name and edition. In fact "devel"
could also be the version and "1.2.3"
would be the release then.
Assuming this Capability should be provided by some package in the ResPool, we check this. If unprovided, we substitute the last, (or one but last) '-'
by a '='
. If the name part (without version) of the resulting Capability matches a package name (not provides!) in the ResPool, this Capability is returned.
Otherwise we return the Capability originally created from str_r.
Definition at line 551 of file Capability.cc.
|
static |
Definition at line 498 of file Capability.cc.
|
inline |
Expert backdoor.
Definition at line 253 of file Capability.h.
|
staticprivate |
Match two Capabilities.
Definition at line 437 of file Capability.cc.
|
related |
Stream output.
Definition at line 562 of file Capability.cc.
|
related |
Detailed stream output.
Definition at line 567 of file Capability.cc.
|
related |
Definition at line 270 of file Capability.h.
|
related |
Definition at line 274 of file Capability.h.
|
related |
Arbitrary order.
Definition at line 278 of file Capability.h.
|
static |
No or Null Capability ( Id 0
).
Definition at line 137 of file Capability.h.
|
static |
Empty Capability.
Definition at line 140 of file Capability.h.
|
private |
Definition at line 259 of file Capability.h.