libzypp  13.10.6
zypp::ResKind Class Reference

Resolvable kinds. More...

#include <ResKind.h>

Inheritance diagram for zypp::ResKind:
zypp::IdStringType< ResKind > zypp::sat::detail::PoolMember

Public Member Functions

 ResKind ()
 Default ctor: nokind. More...
 
 ResKind (sat::detail::IdType id_r)
 Ctor taking kind as string. More...
 
 ResKind (const IdString &idstr_r)
 
 ResKind (const std::string &str_r)
 
 ResKind (const char *cstr_r)
 
std::string satIdent (const std::string &name_r) const
 
- Public Member Functions inherited from zypp::IdStringType< ResKind >
const IdStringidStr () const
 
bool empty () const
 
unsigned size () const
 
const char * c_str () const
 
std::string asString () const
 
IdType id () const
 
 operator bool () const
 Evaluate in a boolean context ( ! empty() ). More...
 
int compare (const ResKind &rhs) const
 
int compare (const IdStringType &rhs) const
 
int compare (const IdString &rhs) const
 
int compare (const std::string &rhs) const
 
int compare (const char *rhs) const
 

Static Public Member Functions

static std::string satIdent (const ResKind &refers_r, const std::string &name_r)
 Return libsolv identifier for name. More...
 
- Static Public Member Functions inherited from zypp::IdStringType< ResKind >
static int compare (const ResKind &lhs, const ResKind &rhs)
 
static int compare (const ResKind &lhs, const IdString &rhs)
 
static int compare (const ResKind &lhs, const std::string &rhs)
 
static int compare (const ResKind &lhs, const char *rhs)
 
static int compare (const IdString &lhs, const ResKind &rhs)
 
static int compare (const IdString &lhs, const IdString &rhs)
 
static int compare (const IdString &lhs, const std::string &rhs)
 
static int compare (const IdString &lhs, const char *rhs)
 
static int compare (const std::string &lhs, const ResKind &rhs)
 
static int compare (const std::string &lhs, const IdString &rhs)
 
static int compare (const std::string &lhs, const std::string &rhs)
 
static int compare (const std::string &lhs, const char *rhs)
 
static int compare (const char *lhs, const ResKind &rhs)
 
static int compare (const char *lhs, const IdString &rhs)
 
static int compare (const char *lhs, const std::string &rhs)
 
static int compare (const char *lhs, const char *rhs)
 

Static Public Attributes

Some builtin ResKind constants.
static const ResKind nokind
 Value representing nokind ("") More...
 
static const ResKind package
 
static const ResKind patch
 
static const ResKind pattern
 
static const ResKind product
 
static const ResKind srcpackage
 

Static Private Member Functions

static int _doCompare (const char *lhs, const char *rhs)
 

Private Attributes

IdString _str
 

Friends

class IdStringType< ResKind >
 

Related Functions

(Note that these are not member functions.)

std::ostream & dumpAsXmlOn (std::ostream &str, const ResKind &obj)
 

Additional Inherited Members

- Public Types inherited from zypp::IdStringType< ResKind >
typedef IdString::IdType IdType
 
- Protected Member Functions inherited from zypp::IdStringType< ResKind >
 IdStringType ()
 
 IdStringType (const IdStringType &)
 
void operator= (const IdStringType &)
 
 ~IdStringType ()
 
- Static Protected Member Functions inherited from zypp::sat::detail::PoolMember
static PoolImplmyPool ()
 

Detailed Description

Resolvable kinds.

A lowercased string and used as identification. Comparison against string values is always case insensitive.

Definition at line 35 of file ResKind.h.

Constructor & Destructor Documentation

zypp::ResKind::ResKind ( )
inline

Default ctor: nokind.

Definition at line 52 of file ResKind.h.

zypp::ResKind::ResKind ( sat::detail::IdType  id_r)
inlineexplicit

Ctor taking kind as string.

Definition at line 55 of file ResKind.h.

zypp::ResKind::ResKind ( const IdString idstr_r)
inlineexplicit

Definition at line 56 of file ResKind.h.

zypp::ResKind::ResKind ( const std::string &  str_r)
inlineexplicit

Definition at line 57 of file ResKind.h.

zypp::ResKind::ResKind ( const char *  cstr_r)
inlineexplicit

Definition at line 58 of file ResKind.h.

Member Function Documentation

std::string zypp::ResKind::satIdent ( const ResKind refers_r,
const std::string &  name_r 
)
static

Return libsolv identifier for name.

Libsolv combines the objects kind and name in a single identifier "pattern:kde_multimedia", except for packages and source packes. They are not prefixed by any kind string.

Definition at line 43 of file ResKind.cc.

std::string zypp::ResKind::satIdent ( const std::string &  name_r) const
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 68 of file ResKind.h.

static int zypp::ResKind::_doCompare ( const char *  lhs,
const char *  rhs 
)
inlinestaticprivate

Definition at line 72 of file ResKind.h.

Friends And Related Function Documentation

friend class IdStringType< ResKind >
friend

Definition at line 80 of file ResKind.h.

std::ostream & dumpAsXmlOn ( std::ostream &  str,
const ResKind obj 
)
related

XML output.

Definition at line 85 of file ResKind.h.

Member Data Documentation

const ResKind zypp::ResKind::nokind
static

Value representing nokind ("")

Definition at line 41 of file ResKind.h.

const ResKind zypp::ResKind::package
static

Definition at line 43 of file ResKind.h.

const ResKind zypp::ResKind::patch
static

Definition at line 44 of file ResKind.h.

const ResKind zypp::ResKind::pattern
static

Definition at line 45 of file ResKind.h.

const ResKind zypp::ResKind::product
static

Definition at line 46 of file ResKind.h.

const ResKind zypp::ResKind::srcpackage
static

Definition at line 47 of file ResKind.h.

IdString zypp::ResKind::_str
private

Definition at line 81 of file ResKind.h.


The documentation for this class was generated from the following files: