libzypp 17.37.10

zypp::ResKind Class Reference

Resolvable kinds. More...

`#include <zypp/ResKind.h>`

Inheritance diagram for zypp::ResKind:

## Related Symbols
(Note that these are not member symbols.)
std::ostream & | dumpAsXmlOn (std::ostream &str, const ResKind &obj)
| XML output.
Related Symbols inherited from zypp::IdStringType< ResKind >
std::ostream & | operator<< (std::ostream &str, const IdStringType< ResKind > &obj)
| Stream output.
bool | operator== (const IdStringType< ResKind > &lhs, const IdStringType< ResKind > &rhs)
| Equal.
bool | operator!= (const IdStringType< ResKind > &lhs, const IdStringType< ResKind > &rhs)
| NotEqual.
bool | operator< (const IdStringType< ResKind > &lhs, const IdStringType< ResKind > &rhs)
| Less.
bool | operator<= (const IdStringType< ResKind > &lhs, const IdStringType< ResKind > &rhs)
| LessEqual.
bool | operator> (const IdStringType< ResKind > &lhs, const IdStringType< ResKind > &rhs)
| Greater.
bool | operator>= (const IdStringType< ResKind > &lhs, const IdStringType< ResKind > &rhs)
| GreaterEqual.

## Some builtin ResKind constants.
static const ResKind | nokind
| Value representing `nokind` ("")
static const ResKind | package
static const ResKind | patch
static const ResKind | pattern
static const ResKind | product
static const ResKind | srcpackage
static const ResKind | application
class | IdStringType< ResKind >
IdString | _str
static ResKind | explicitBuiltin (const char *str_r)
| Return the builtin kind if str_r explicitly prefixed.
static ResKind | explicitBuiltin (const std::string &str_r)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
static ResKind | explicitBuiltin (const IdString &str_r)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
static std::string | satIdent (const ResKind &refers_r, const std::string &name_r)
| Return libsolv identifier for name.
| ResKind ()
| Default ctor: nokind.
| ResKind (sat::detail::IdType id_r)
| Ctor taking kind as string.
| 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
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
static int | _doCompare (const char *lhs, const char *rhs)

## Additional Inherited Members
Public Types inherited from zypp::IdStringType< ResKind >
using | IdType
Public Member Functions inherited from zypp::IdStringType< ResKind >
IdString | idStr () 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 ( !
| operator IdString () const
| Explicit conversion to IdString.
| operator std::string () const
| Explicit conversion to std::string.
Static Public Member Functions inherited from zypp::IdStringType< ResKind >
static int | compare (const ResKind &lhs, const ResKind &rhs)
Protected Member Functions inherited from zypp::IdStringType< ResKind >
| IdStringType ()=default
IdStringType & | operator= (const IdStringType &)=default
| ~IdStringType ()=default
Static Protected Member Functions inherited from zypp::sat::detail::PoolMember
static PoolImpl & | myPool ()

## Detailed Description

Resolvable kinds.

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

Definition at line 32 of file ResKind.h.

## Constructor & Destructor Documentation

## ◆ ResKind() [1/5]

zypp::ResKind::ResKind | ( |  | ) |
| inline

Default ctor: nokind.

Definition at line 63 of file ResKind.h.

## ◆ ResKind() [2/5]

zypp::ResKind::ResKind | ( | sat::detail::IdType | id_r | ) |
| inline explicit

Ctor taking kind as string.

Definition at line 66 of file ResKind.h.

## ◆ ResKind() [3/5]

zypp::ResKind::ResKind | ( | const IdString & | idstr_r | ) |
| inline explicit

Definition at line 67 of file ResKind.h.

## ◆ ResKind() [4/5]

zypp::ResKind::ResKind | ( | const std::string & | str_r | ) |
| inline explicit

Definition at line 68 of file ResKind.h.

## ◆ ResKind() [5/5]

zypp::ResKind::ResKind | ( | const char * | cstr_r | ) |
| inline explicit

Definition at line 69 of file ResKind.h.

## Member Function Documentation

## ◆ explicitBuiltin() [1/3]

ResKind zypp::ResKind::explicitBuiltin | ( | const char * | str_r | ) |
| static

Return the builtin kind if str_r explicitly prefixed.

str_r must start with a builtin kind followed by a `'`:'. If no builtin kind is detected, nokind is returned, which usually indicates a package or srcpackage.

Definition at line 46 of file ResKind.cc.

## ◆ explicitBuiltin() [2/3]

ResKind zypp::ResKind::explicitBuiltin | ( | const std::string & | str_r | ) |
| inline static

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 55 of file ResKind.h.

## ◆ explicitBuiltin() [3/3]

ResKind zypp::ResKind::explicitBuiltin | ( | const IdString & | str_r | ) |
| inline static

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 58 of file ResKind.h.

## ◆ satIdent() [1/2]

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 68 of file ResKind.cc.

## ◆ satIdent() [2/2]

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 79 of file ResKind.h.

## ◆ _doCompare()

int zypp::ResKind::_doCompare | ( | const char * | lhs,
|  | const char * | rhs )
| inline static private

Definition at line 83 of file ResKind.h.

## Friends And Related Symbol Documentation

## ◆ IdStringType< ResKind >

friend class IdStringType< ResKind >
| friend

Definition at line 83 of file ResKind.h.

## ◆ dumpAsXmlOn()

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

XML output.

Definition at line 96 of file ResKind.h.

## Member Data Documentation

## ◆ nokind

const ResKind zypp::ResKind::nokind
| static

Value representing `nokind` ("")

Definition at line 38 of file ResKind.h.

## ◆ package

const ResKind zypp::ResKind::package
| static

Definition at line 40 of file ResKind.h.

## ◆ patch

const ResKind zypp::ResKind::patch
| static

Definition at line 41 of file ResKind.h.

## ◆ pattern

const ResKind zypp::ResKind::pattern
| static

Definition at line 42 of file ResKind.h.

## ◆ product

const ResKind zypp::ResKind::product
| static

Definition at line 43 of file ResKind.h.

## ◆ srcpackage

const ResKind zypp::ResKind::srcpackage
| static

Definition at line 44 of file ResKind.h.

## ◆ application

const ResKind zypp::ResKind::application
| static

Definition at line 45 of file ResKind.h.

## ◆ _str

IdString zypp::ResKind::_str
| private

Definition at line 92 of file ResKind.h.

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

- zypp/ResKind.h
- zypp/ResKind.cc