libzypp: zypp::sat::SolvableType< Derived > Class Template Reference

libzypp 17.25.10

Public Member Functions | Public Attributes | Protected Member Functions | Related Functions | List of all members
zypp::sat::SolvableType< Derived > Class Template Reference
CRTP solutions

Base class for creating Solvable based types. More...

`#include <SolvableType.h>`

## Public Member Functions
Solvable | satSolvable () const
| Return the corresponding sat::Solvable. More...
| operator bool () const
IdString | ident () const
ResKind | kind () const
bool | isKind (const ResKind &kind_r) const
template<class TRes >
bool | isKind () const
template<class TIterator >
bool | isKind (TIterator begin, TIterator end) const
std::string | name () const
Edition | edition () const
Arch | arch () const
IdString | vendor () const
Repository | repository () const
RepoInfo | repoInfo () const
bool | isSystem () const
bool | onSystemByUser () const
bool | onSystemByAuto () const
bool | identIsAutoInstalled () const
bool | multiversionInstall () const
bool | isNeedreboot () const
bool | isRetracted () const
bool | isPtf () const
Date | buildtime () const
Date | installtime () const
std::string | asString () const
std::string | asUserString () const
bool | identical (const Solvable &rhs) const
template<class RDerived >
bool | identical (const SolvableType< RDerived > &rhs) const
bool | sameNVRA (const Solvable &rhs) const
template<class RDerived >
bool | sameNVRA (const SolvableType< RDerived > &rhs) const
Capabilities | provides () const
Capabilities | conflicts () const
Capabilities | obsoletes () const
Capabilities | recommends () const
Capabilities | suggests () const
Capabilities | enhances () const
Capabilities | supplements () const
Capabilities | prerequires () const
Capabilities | dep (Dep which_r) const
Capabilities | operator[] (Dep which_r) const
CapabilitySet | providesNamespace (const std::string &namespace_r) const
CapabilitySet | valuesOfNamespace (const std::string &namespace_r) const
bool | supportsLocales () const
bool | supportsLocale (const Locale &locale_r) const
bool | supportsLocale (const LocaleSet &locales_r) const
bool | supportsRequestedLocales () const
LocaleSet | getSupportedLocales () const
CpeId | cpeId () const
unsigned | mediaNr () const
ByteCount | installSize () const
ByteCount | downloadSize () const
std::string | distribution () const
std::string | summary (const Locale &lang_r=Locale()) const
std::string | description (const Locale &lang_r=Locale()) const
std::string | insnotify (const Locale &lang_r=Locale()) const
std::string | delnotify (const Locale &lang_r=Locale()) const
std::string | licenseToConfirm (const Locale &lang_r=Locale()) const
bool | needToAcceptLicense () const
std::string | lookupStrAttribute (const SolvAttr &attr) const
std::string | lookupStrAttribute (const SolvAttr &attr, const Locale &lang_r) const
bool | lookupBoolAttribute (const SolvAttr &attr) const
detail::IdType | lookupIdAttribute (const SolvAttr &attr) const
unsigned long long | lookupNumAttribute (const SolvAttr &attr) const
unsigned long long | lookupNumAttribute (const SolvAttr &attr, unsigned long long notfound_r) const
CheckSum | lookupCheckSumAttribute (const SolvAttr &attr) const
OnMediaLocation | lookupLocation () const
Solvable::IdType | id () const

## Public Attributes
Capabilities | const { return satSolvable().requires()

## Protected Member Functions
| SolvableType ()
| SolvableType (const SolvableType &)
void | operator= (const SolvableType &)
| SolvableType (SolvableType &&)
void | operator= (SolvableType &&)
| ~SolvableType ()

## Related Functions
(Note that these are not member functions.)
template<class Derived >
std::ostream & | operator<< (std::ostream &str, const SolvableType< Derived > &obj)
| Stream output. More...
template<class Derived >
std::ostream & | dumpOn (std::ostream &str, const SolvableType< Derived > &obj)
| More verbose stream output including dependencies. More...
template<class LDerived , class RDerived >
bool | operator== (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| Equal. More...
template<class LDerived , class RDerived >
bool | operator!= (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| NotEqual. More...
template<class LDerived , class RDerived >
bool | operator< (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| Less. More...
template<class TRes , class Derived >
bool | isKind (const SolvableType< Derived > &solvable_r)
| Test whether the Solvable is of a certain ResKind. More...
template<class LDerived , class RDerived >
bool | identical (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| Test for same content. More...
template<class LDerived , class RDerived >
bool | sameNVRA (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| Test for same name version release and arch. More...
template<class LDerived , class RDerived >
int | compareByN (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| Compare according to kind and name. More...
template<class LDerived , class RDerived >
int | compareByNVR (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| Compare according to kind, name and edition. More...
template<class LDerived , class RDerived >
int | compareByNVRA (const SolvableType< LDerived > &lhs, const SolvableType< RDerived > &rhs)
| Compare according to kind, name, edition and arch. More...

## Detailed Description

template<class Derived>
class zypp::sat::SolvableType< Derived >

Base class for creating Solvable based types.

Derive from this and offer explicit conversion to Solvable to make the Solvable properties directly accessible.

Different SolvableTypes are comparable based on the underlying Solvable.

See also
  Solvable

class MySolvable : public SolvableType<MySolvable>
{
......
public:
explicit operator sat::Solvable() const;
};
zypp::sat::SolvableType::SolvableType
SolvableType()
Definition: SolvableType.h:147

Definition at line 54 of file SolvableType.h.

## Constructor & Destructor Documentation

## ◆ SolvableType() [1/3]

template<class Derived >

zypp::sat::SolvableType< Derived >::SolvableType | ( |  | ) |
| inlineprotected

Definition at line 147 of file SolvableType.h.

## ◆ SolvableType() [2/3]

template<class Derived >

zypp::sat::SolvableType< Derived >::SolvableType | ( | const SolvableType< Derived > & |  | ) |
| inlineprotected

Definition at line 148 of file SolvableType.h.

## ◆ SolvableType() [3/3]

template<class Derived >

zypp::sat::SolvableType< Derived >::SolvableType | ( | SolvableType< Derived > && |  | ) |
| inlineprotected

Definition at line 150 of file SolvableType.h.

## ◆ ~SolvableType()

template<class Derived >

zypp::sat::SolvableType< Derived >::~SolvableType | ( |  | ) |
| inlineprotected

Definition at line 152 of file SolvableType.h.

## Member Function Documentation

## ◆ satSolvable()

template<class Derived >

Solvable zypp::sat::SolvableType< Derived >::satSolvable | ( |  | ) | const
| inline

Return the corresponding sat::Solvable.

Definition at line 57 of file SolvableType.h.

## ◆ operator bool()

template<class Derived >

zypp::sat::SolvableType< Derived >::operator bool | ( |  | ) | const
| inlineexplicit

Definition at line 59 of file SolvableType.h.

## ◆ ident()

template<class Derived >

IdString zypp::sat::SolvableType< Derived >::ident | ( |  | ) | const
| inline

Definition at line 61 of file SolvableType.h.

## ◆ kind()

template<class Derived >

ResKind zypp::sat::SolvableType< Derived >::kind | ( |  | ) | const
| inline

Definition at line 63 of file SolvableType.h.

## ◆ isKind() [1/3]

template<class Derived >

bool zypp::sat::SolvableType< Derived >::isKind | ( | const ResKind & | kind_r | ) | const
| inline

Definition at line 64 of file SolvableType.h.

## ◆ isKind() [2/3]

template<class Derived >
template<class TRes >

bool zypp::sat::SolvableType< Derived >::isKind | ( |  | ) | const
| inline

Definition at line 66 of file SolvableType.h.

## ◆ isKind() [3/3]

template<class Derived >
template<class TIterator >

bool zypp::sat::SolvableType< Derived >::isKind | ( | TIterator | begin,
|  | TIterator | end
| ) |  | const
| inline

Definition at line 68 of file SolvableType.h.

## ◆ name()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::name | ( |  | ) | const
| inline

Definition at line 70 of file SolvableType.h.

## ◆ edition()

template<class Derived >

Edition zypp::sat::SolvableType< Derived >::edition | ( |  | ) | const
| inline

Definition at line 71 of file SolvableType.h.

## ◆ arch()

template<class Derived >

Arch zypp::sat::SolvableType< Derived >::arch | ( |  | ) | const
| inline

Definition at line 72 of file SolvableType.h.

## ◆ vendor()

template<class Derived >

IdString zypp::sat::SolvableType< Derived >::vendor | ( |  | ) | const
| inline

Definition at line 73 of file SolvableType.h.

## ◆ repository()

template<class Derived >

Repository zypp::sat::SolvableType< Derived >::repository | ( |  | ) | const
| inline

Definition at line 75 of file SolvableType.h.

## ◆ repoInfo()

template<class Derived >

RepoInfo zypp::sat::SolvableType< Derived >::repoInfo | ( |  | ) | const
| inline

Definition at line 76 of file SolvableType.h.

## ◆ isSystem()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::isSystem | ( |  | ) | const
| inline

Definition at line 78 of file SolvableType.h.

## ◆ onSystemByUser()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::onSystemByUser | ( |  | ) | const
| inline

Definition at line 79 of file SolvableType.h.

## ◆ onSystemByAuto()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::onSystemByAuto | ( |  | ) | const
| inline

Definition at line 80 of file SolvableType.h.

## ◆ identIsAutoInstalled()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::identIsAutoInstalled | ( |  | ) | const
| inline

Definition at line 81 of file SolvableType.h.

## ◆ multiversionInstall()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::multiversionInstall | ( |  | ) | const
| inline

Definition at line 82 of file SolvableType.h.

## ◆ isNeedreboot()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::isNeedreboot | ( |  | ) | const
| inline

Definition at line 83 of file SolvableType.h.

## ◆ isRetracted()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::isRetracted | ( |  | ) | const
| inline

Definition at line 84 of file SolvableType.h.

## ◆ isPtf()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::isPtf | ( |  | ) | const
| inline

Definition at line 85 of file SolvableType.h.

## ◆ buildtime()

template<class Derived >

Date zypp::sat::SolvableType< Derived >::buildtime | ( |  | ) | const
| inline

Definition at line 87 of file SolvableType.h.

## ◆ installtime()

template<class Derived >

Date zypp::sat::SolvableType< Derived >::installtime | ( |  | ) | const
| inline

Definition at line 88 of file SolvableType.h.

## ◆ asString()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::asString | ( |  | ) | const
| inline

Definition at line 90 of file SolvableType.h.

## ◆ asUserString()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::asUserString | ( |  | ) | const
| inline

Definition at line 91 of file SolvableType.h.

## ◆ identical() [1/2]

template<class Derived >

bool zypp::sat::SolvableType< Derived >::identical | ( | const Solvable & | rhs | ) | const
| inline

Definition at line 93 of file SolvableType.h.

## ◆ identical() [2/2]

template<class Derived >
template<class RDerived >

bool zypp::sat::SolvableType< Derived >::identical | ( | const SolvableType< RDerived > & | rhs | ) | const
| inline

Definition at line 95 of file SolvableType.h.

## ◆ sameNVRA() [1/2]

template<class Derived >

bool zypp::sat::SolvableType< Derived >::sameNVRA | ( | const Solvable & | rhs | ) | const
| inline

Definition at line 97 of file SolvableType.h.

## ◆ sameNVRA() [2/2]

template<class Derived >
template<class RDerived >

bool zypp::sat::SolvableType< Derived >::sameNVRA | ( | const SolvableType< RDerived > & | rhs | ) | const
| inline

Definition at line 99 of file SolvableType.h.

## ◆ provides()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::provides | ( |  | ) | const
| inline

Definition at line 101 of file SolvableType.h.

## ◆ conflicts()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::conflicts | ( |  | ) | const
| inline

Definition at line 103 of file SolvableType.h.

## ◆ obsoletes()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::obsoletes | ( |  | ) | const
| inline

Definition at line 104 of file SolvableType.h.

## ◆ recommends()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::recommends | ( |  | ) | const
| inline

Definition at line 105 of file SolvableType.h.

## ◆ suggests()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::suggests | ( |  | ) | const
| inline

Definition at line 106 of file SolvableType.h.

## ◆ enhances()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::enhances | ( |  | ) | const
| inline

Definition at line 107 of file SolvableType.h.

## ◆ supplements()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::supplements | ( |  | ) | const
| inline

Definition at line 108 of file SolvableType.h.

## ◆ prerequires()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::prerequires | ( |  | ) | const
| inline

Definition at line 109 of file SolvableType.h.

## ◆ dep()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::dep | ( | Dep | which_r | ) | const
| inline

Definition at line 110 of file SolvableType.h.

## ◆ operator[]()

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::operator[] | ( | Dep | which_r | ) | const
| inline

Definition at line 111 of file SolvableType.h.

## ◆ providesNamespace()

template<class Derived >

CapabilitySet zypp::sat::SolvableType< Derived >::providesNamespace | ( | const std::string & | namespace_r | ) | const
| inline

Definition at line 113 of file SolvableType.h.

## ◆ valuesOfNamespace()

template<class Derived >

CapabilitySet zypp::sat::SolvableType< Derived >::valuesOfNamespace | ( | const std::string & | namespace_r | ) | const
| inline

Definition at line 114 of file SolvableType.h.

## ◆ supportsLocales()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::supportsLocales | ( |  | ) | const
| inline

Definition at line 116 of file SolvableType.h.

## ◆ supportsLocale() [1/2]

template<class Derived >

bool zypp::sat::SolvableType< Derived >::supportsLocale | ( | const Locale & | locale_r | ) | const
| inline

Definition at line 117 of file SolvableType.h.

## ◆ supportsLocale() [2/2]

template<class Derived >

bool zypp::sat::SolvableType< Derived >::supportsLocale | ( | const LocaleSet & | locales_r | ) | const
| inline

Definition at line 118 of file SolvableType.h.

## ◆ supportsRequestedLocales()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::supportsRequestedLocales | ( |  | ) | const
| inline

Definition at line 119 of file SolvableType.h.

## ◆ getSupportedLocales()

template<class Derived >

LocaleSet zypp::sat::SolvableType< Derived >::getSupportedLocales | ( |  | ) | const
| inline

Definition at line 120 of file SolvableType.h.

## ◆ cpeId()

template<class Derived >

CpeId zypp::sat::SolvableType< Derived >::cpeId | ( |  | ) | const
| inline

Definition at line 122 of file SolvableType.h.

## ◆ mediaNr()

template<class Derived >

unsigned zypp::sat::SolvableType< Derived >::mediaNr | ( |  | ) | const
| inline

Definition at line 123 of file SolvableType.h.

## ◆ installSize()

template<class Derived >

ByteCount zypp::sat::SolvableType< Derived >::installSize | ( |  | ) | const
| inline

Definition at line 124 of file SolvableType.h.

## ◆ downloadSize()

template<class Derived >

ByteCount zypp::sat::SolvableType< Derived >::downloadSize | ( |  | ) | const
| inline

Definition at line 125 of file SolvableType.h.

## ◆ distribution()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::distribution | ( |  | ) | const
| inline

Definition at line 126 of file SolvableType.h.

## ◆ summary()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::summary | ( | const Locale & | lang_r = `Locale()` | ) | const
| inline

Definition at line 128 of file SolvableType.h.

## ◆ description()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::description | ( | const Locale & | lang_r = `Locale()` | ) | const
| inline

Definition at line 129 of file SolvableType.h.

## ◆ insnotify()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::insnotify | ( | const Locale & | lang_r = `Locale()` | ) | const
| inline

Definition at line 130 of file SolvableType.h.

## ◆ delnotify()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::delnotify | ( | const Locale & | lang_r = `Locale()` | ) | const
| inline

Definition at line 131 of file SolvableType.h.

## ◆ licenseToConfirm()

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::licenseToConfirm | ( | const Locale & | lang_r = `Locale()` | ) | const
| inline

Definition at line 132 of file SolvableType.h.

## ◆ needToAcceptLicense()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::needToAcceptLicense | ( |  | ) | const
| inline

Definition at line 133 of file SolvableType.h.

## ◆ lookupStrAttribute() [1/2]

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::lookupStrAttribute | ( | const SolvAttr & | attr | ) | const
| inline

Definition at line 136 of file SolvableType.h.

## ◆ lookupStrAttribute() [2/2]

template<class Derived >

std::string zypp::sat::SolvableType< Derived >::lookupStrAttribute | ( | const SolvAttr & | attr,
|  | const Locale & | lang_r
| ) |  | const
| inline

Definition at line 137 of file SolvableType.h.

## ◆ lookupBoolAttribute()

template<class Derived >

bool zypp::sat::SolvableType< Derived >::lookupBoolAttribute | ( | const SolvAttr & | attr | ) | const
| inline

Definition at line 138 of file SolvableType.h.

## ◆ lookupIdAttribute()

template<class Derived >

detail::IdType zypp::sat::SolvableType< Derived >::lookupIdAttribute | ( | const SolvAttr & | attr | ) | const
| inline

Definition at line 139 of file SolvableType.h.

## ◆ lookupNumAttribute() [1/2]

template<class Derived >

unsigned long long zypp::sat::SolvableType< Derived >::lookupNumAttribute | ( | const SolvAttr & | attr | ) | const
| inline

Definition at line 140 of file SolvableType.h.

## ◆ lookupNumAttribute() [2/2]

template<class Derived >

unsigned long long zypp::sat::SolvableType< Derived >::lookupNumAttribute | ( | const SolvAttr & | attr,
|  | unsigned long long | notfound_r
| ) |  | const
| inline

Definition at line 141 of file SolvableType.h.

## ◆ lookupCheckSumAttribute()

template<class Derived >

CheckSum zypp::sat::SolvableType< Derived >::lookupCheckSumAttribute | ( | const SolvAttr & | attr | ) | const
| inline

Definition at line 142 of file SolvableType.h.

## ◆ lookupLocation()

template<class Derived >

OnMediaLocation zypp::sat::SolvableType< Derived >::lookupLocation | ( |  | ) | const
| inline

Definition at line 143 of file SolvableType.h.

## ◆ id()

template<class Derived >

Solvable::IdType zypp::sat::SolvableType< Derived >::id | ( |  | ) | const
| inline

Definition at line 144 of file SolvableType.h.

## ◆ operator=() [1/2]

template<class Derived >

void zypp::sat::SolvableType< Derived >::operator= | ( | const SolvableType< Derived > & |  | ) |
| inlineprotected

Definition at line 149 of file SolvableType.h.

## ◆ operator=() [2/2]

template<class Derived >

void zypp::sat::SolvableType< Derived >::operator= | ( | SolvableType< Derived > && |  | ) |
| inlineprotected

Definition at line 151 of file SolvableType.h.

## Friends And Related Function Documentation

## ◆ operator<<()

template<class Derived >

std::ostream & operator<< | ( | std::ostream & | str,
|  | const SolvableType< Derived > & | obj
| ) |  |
| related

Stream output.

Definition at line 157 of file SolvableType.h.

## ◆ dumpOn()

template<class Derived >

std::ostream & dumpOn | ( | std::ostream & | str,
|  | const SolvableType< Derived > & | obj
| ) |  |
| related

More verbose stream output including dependencies.

Definition at line 162 of file SolvableType.h.

## ◆ operator==()

template<class LDerived , class RDerived >

bool operator== | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

Equal.

Definition at line 167 of file SolvableType.h.

## ◆ operator!=()

template<class LDerived , class RDerived >

bool operator!= | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

NotEqual.

Definition at line 180 of file SolvableType.h.

## ◆ operator<()

template<class LDerived , class RDerived >

bool operator< | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

Less.

Definition at line 193 of file SolvableType.h.

## ◆ isKind()

template<class TRes , class Derived >

bool isKind | ( | const SolvableType< Derived > & | solvable_r | ) |
| related

Test whether the Solvable is of a certain ResKind.

Definition at line 206 of file SolvableType.h.

## ◆ identical()

template<class LDerived , class RDerived >

bool identical | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

Test for same content.

Definition at line 211 of file SolvableType.h.

## ◆ sameNVRA()

template<class LDerived , class RDerived >

bool sameNVRA | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

Test for same name version release and arch.

Definition at line 224 of file SolvableType.h.

## ◆ compareByN()

template<class LDerived , class RDerived >

int compareByN | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

Compare according to kind and name.

Definition at line 238 of file SolvableType.h.

## ◆ compareByNVR()

template<class LDerived , class RDerived >

int compareByNVR | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

Compare according to kind, name and edition.

Definition at line 252 of file SolvableType.h.

## ◆ compareByNVRA()

template<class LDerived , class RDerived >

int compareByNVRA | ( | const SolvableType< LDerived > & | lhs,
|  | const SolvableType< RDerived > & | rhs
| ) |  |
| related

Compare according to kind, name, edition and arch.

Definition at line 265 of file SolvableType.h.

## Member Data Documentation

## ◆ const

template<class Derived >

Capabilities zypp::sat::SolvableType< Derived >::const { return satSolvable().requires()

Definition at line 102 of file SolvableType.h.

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

- zypp/sat/SolvableType.h