12#ifndef ZYPP_CAPABILITY_H
13#define ZYPP_CAPABILITY_H
112 Capability(
const std::string & name_r,
const std::string & op_r,
const std::string & ed_r,
const ResKind & prefix_r =
ResKind() );
123 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() );
125 Capability(
const std::string & arch_r,
const std::string & name_r,
Rel op_r,
const std::string & ed_r,
const ResKind & prefix_r =
ResKind() );
129 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() );
155 {
return !
empty(); }
165 const char *
c_str()
const;
281 {
return lhs.
id() == rhs.
id(); }
285 {
return lhs.
id() != rhs.
id(); }
289 {
return lhs.
id() < rhs.
id(); }
Provides API related macros.
Helper providing more detailed information about a Capability.
CapDetail(const Capability &cap_r)
CapDetail(sat::detail::IdType id_r)
sat::detail::IdType _archIfSimple
CapRel
Enum values corresponding with libsolv defines.
@ REL_NONE
Not an expression.
@ CAP_ARCH
Used internally.
bool isExpression() const
Tri state Capability match result.
static CapMatch matches(const char *lhs, const char *rhs)
static CapMatch matches(const IdString &lhs, const std::string &rhs)
Capability(ResolverNamespace namespace_r, const char *value_r)
sat::detail::IdType id() const
Expert backdoor.
CapMatch matches(const char *rhs) const
static CapMatch matches(const char *lhs, const IdString &rhs)
std::string asString() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
CapMatch matches(const IdString &rhs) const
static CapMatch matches(const std::string &lhs, const Capability &rhs)
static CapMatch matches(const Capability &lhs, const std::string &rhs)
CapMatch matches(const std::string &rhs) const
static CapMatch matches(const IdString &lhs, const Capability &rhs)
static const Capability Null
No or Null Capability ( Id 0 ).
static CapMatch matches(const IdString &lhs, const char *rhs)
static CapMatch matches(const Capability &lhs, const Capability &rhs)
CapMatch matches(const Capability &rhs) const
Capability()
Default ctor, Empty capability.
bool empty() const
Whether the Capability is empty.
CapDetail detail() const
Helper providing more detailed information about a Capability.
static CapMatch matches(const Capability &lhs, const char *rhs)
bool operator!=(const Capability &lhs, const Capability &rhs)
static CapMatch matches(const std::string &lhs, const IdString &rhs)
const char * c_str() const
Conversion to const char *
bool operator==(const Capability &lhs, const Capability &rhs)
static CapMatch _doMatch(sat::detail::IdType lhs, sat::detail::IdType rhs)
Match two Capabilities.
static bool isInterestingFileSpec(const IdString &name_r)
Test for a filename that is likely being REQUIRED.
bool operator<(const Capability &lhs, const Capability &rhs)
Arbitrary order.
static CapMatch matches(const Capability &lhs, const IdString &rhs)
Capability(ResolverNamespace namespace_r, const std::string &value_r)
static const Capability Empty
Empty Capability.
static bool isInterestingFileSpec(const std::string &name_r)
static Capability guessPackageSpec(const std::string &str_r)
Capability parser also guessing "libzypp-1.2.3-4.5.x86_64" formats.
Capability(sat::detail::IdType id_r)
Ctor from id.
static CapMatch matches(const IdString &lhs, const IdString &rhs)
static CapMatch matches(const char *lhs, const Capability &rhs)
static CapMatch matches(const char *lhs, const std::string &rhs)
static CapMatch matches(const std::string &lhs, const char *rhs)
static CapMatch matches(const std::string &lhs, const std::string &rhs)
Edition represents [epoch:]version[-release]
Access to the sat-pools string space.
const char * c_str() const
Conversion to const char *
IdType id() const
Expert backdoor.
static const IdString Null
No or Null string ( Id 0 ).
String related utilities and Regular expression matching.
static const IdType emptyId(1)
static const IdType noId(0)
int IdType
Generic Id type.
Easy-to use interface to the ZYPP dependency resolver.
std::unordered_set< Capability > CapabilitySet
ResolverNamespace
The resolver's dependency namespaces.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
std::ostream & operator<<(std::ostream &str, const SerialNumber &obj)
CapMatch operator()(const Capability &lhs, const Capability &rhs) const
Backlink to the associated PoolImpl.
#define ZYPP_DEFINE_ID_HASHABLE(C)
Define hash function for id based classes.