12 #ifndef ZYPP_CAPABILITY_H
13 #define ZYPP_CAPABILITY_H
102 Capability(
const std::string & name_r,
const std::string & op_r,
const std::string & ed_r,
const ResKind & prefix_r =
ResKind() );
113 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() );
115 Capability(
const std::string & arch_r,
const std::string & name_r,
Rel op_r,
const std::string & ed_r,
const ResKind & prefix_r =
ResKind() );
119 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() );
135 explicit operator bool()
const
136 {
return !
empty(); }
146 const char *
c_str()
const;
195 struct Matches:
public std::binary_function<Capability,Capability,CapMatch>
262 {
return lhs.
id() == rhs.
id(); }
266 {
return lhs.
id() != rhs.
id(); }
270 {
return lhs.
id() < rhs.
id(); }
378 #endif // ZYPP_CAPABILITY_H
static CapMatch matches(const IdString &lhs, const std::string &rhs)
int IdType
Generic Id type.
static CapMatch _doMatch(sat::detail::IdType lhs, sat::detail::IdType rhs)
Match two Capabilities.
static Capability guessPackageSpec(const std::string &str_r)
Capability parser also guessing "libzypp-1.2.3-4.5.x86_64" formats.
Helper providing more detailed information about a Capability.
static CapMatch matches(const std::string &lhs, const char *rhs)
static CapMatch matches(const Capability &lhs, const std::string &rhs)
static CapMatch matches(const IdString &lhs, const char *rhs)
IdType id() const
Expert backdoor.
CapDetail(sat::detail::IdType id_r)
static CapMatch matches(const Capability &lhs, const char *rhs)
static CapMatch matches(const char *lhs, const IdString &rhs)
Capability(sat::detail::IdType id_r)
Ctor from id.
Access to the sat-pools string space.
Edition represents [epoch:]version[-release]
CapMatch operator()(const Capability &lhs, const Capability &rhs) const
static bool isInterestingFileSpec(const IdString &name_r)
Test for a filename that is likely being REQUIRED.
std::tr1::unordered_set< Capability > CapabilitySet
static bool isInterestingFileSpec(const std::string &name_r)
CapDetail detail() const
Helper providing more detailed information about a Capability.
Backlink to the associated PoolImpl.
static const IdType emptyId(1)
bool operator<(const Capability &lhs, const Capability &rhs)
static CapMatch matches(const char *lhs, const std::string &rhs)
std::ostream & operator<<(std::ostream &str, const Exception &obj)
CapMatch matches(const char *rhs) const
Provides API related macros.
CapMatch matches(const std::string &rhs) const
bool empty() const
Whether the Capability is empty.
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.
static CapMatch matches(const Capability &lhs, const IdString &rhs)
static CapMatch matches(const char *lhs, const char *rhs)
static CapMatch matches(const IdString &lhs, const Capability &rhs)
CapDetail(const Capability &cap_r)
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
Tri state Capability match result.
const char * c_str() const
Conversion to const char *
static const Capability Null
No or Null Capability ( Id 0 ).
bool isExpression() const
static CapMatch matches(const char *lhs, const Capability &rhs)
CapMatch matches(const Capability &rhs) const
sat::detail::IdType _archIfSimple
bool operator!=(const Capability &lhs, const Capability &rhs)
static const IdType noId(0)
static CapMatch matches(const std::string &lhs, const Capability &rhs)
static const Capability Empty
Empty Capability.
Capability()
Default ctor, Empty capability.
const char * c_str() const
Conversion to const char *
static CapMatch matches(const IdString &lhs, const IdString &rhs)
CapRel
Enum values corresponding with libsolv defines.
std::string asString() const
CapMatch matches(const IdString &rhs) const
bool operator==(const Capability &lhs, const Capability &rhs)
static CapMatch matches(const std::string &lhs, const IdString &rhs)
static CapMatch matches(const Capability &lhs, const Capability &rhs)
sat::detail::IdType id() const
Expert backdoor.
static CapMatch matches(const std::string &lhs, const std::string &rhs)