libzypp  11.13.5
zypp::sat::Solvable Class Reference

A Solvable object within the sat Pool. More...

#include <Solvable.h>

Inheritance diagram for zypp::sat::Solvable:

List of all members.

Classes

class  SplitIdent
 Helper that splits an identifier into kind and name or vice versa. More...

Public Types

typedef sat::detail::SolvableIdType IdType

Public Member Functions

 Solvable ()
 Default ctor creates noSolvable.
 Solvable (IdType id_r)
 PoolImpl ctor.
bool isSystem () const
 Return whether this Solvable belongs to the system repo.
bool onSystemByUser () const
 Whether this is known to be installed on behalf of a user request.
Repository repository () const
 The Repository this Solvable belongs to.
IdString ident () const
 The identifier.
ResKind kind () const
bool isKind (const ResKind &kind_r) const
 Test whether a Solvable is of a certain ResKind.
template<class _Res >
bool isKind () const
template<class _Iterator >
bool isKind (_Iterator begin, _Iterator end)
std::string name () const
Edition edition () const
Arch arch () const
IdString vendor () const
bool multiversionInstall () const
 Whether different versions of this package can be installed at the same time.
std::string asString () const
 String representation "ident-edition.arch" or "noSolvable".
bool identical (Solvable rhs) const
 Test whether two Solvables have the same content.
bool sameNVRA (Solvable rhs) const
 Test for same name-version-release.arch.
Solvable nextInPool () const
 Return next Solvable in Pool (or noSolvable).
Solvable nextInRepo () const
 Return next Solvable in Repo (or noSolvable).
::_Solvable * get () const
 Expert backdoor.
IdType id () const
 Expert backdoor.
Attribute lookup.
See also:
LookupAttr and ArrayAttr providing a general, more query like interface for attribute retrieval.
std::string lookupStrAttribute (const SolvAttr &attr) const
 returns the string attribute value for attr or an empty string if it does not exists.
std::string lookupStrAttribute (const SolvAttr &attr, const Locale &lang_r) const
unsigned long long lookupNumAttribute (const SolvAttr &attr) const
 returns the numeric attribute value for attr or 0 if it does not exists.
bool lookupBoolAttribute (const SolvAttr &attr) const
 returns the boolean attribute value for attr or false if it does not exists.
detail::IdType lookupIdAttribute (const SolvAttr &attr) const
 returns the id attribute value for attr or detail::noId if it does not exists.
CheckSum lookupCheckSumAttribute (const SolvAttr &attr) const
 returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist.
OnMediaLocation lookupLocation () const
 returns OnMediaLocation data: This is everything we need to download e.g.
Access to the \ref Solvable dependencies.
Note:
Prerequires are a subset of requires.
Capabilities operator[] (Dep which_r) const
Capabilities provides () const
Capabilities requires () const
Capabilities conflicts () const
Capabilities obsoletes () const
Capabilities recommends () const
Capabilities suggests () const
Capabilities enhances () const
Capabilities supplements () const
Capabilities prerequires () const
CapabilitySet providesNamespace (const std::string &namespace_r) const
 Return the namespaced provides 'namespace([value])[ op edition]' of this Solvable.
CapabilitySet valuesOfNamespace (const std::string &namespace_r) const
 Return 'value[ op edition]' for namespaced provides 'namespace(value)[ op edition]'.
Locale support.
bool supportsLocales () const
 Whether this Solvable claims to support locales.
bool supportsLocale (const Locale &locale_r) const
 Whether this Solvable supports a specific Locale.
bool supportsLocale (const LocaleSet &locales_r) const
 Whether this Solvable supports at least one of the specified locales.
bool supportsRequestedLocales () const
 Whether this Solvable supports at least one requested locale.
void getSupportedLocales (LocaleSet &locales_r) const
 Return the supported locales via locales_r.
LocaleSet getSupportedLocales () const

Static Public Attributes

static const Solvable noSolvable
 Represents no Solvable.

Private Member Functions

friend base::SafeBool () const
bool boolTest () const
- Private Member Functions inherited from zypp::base::SafeBool< Solvable >
 operator bool_type () const
 ~SafeBool ()

Private Attributes

IdType _id

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Solvable &obj)
std::ostream & dumpOn (std::ostream &str, const Solvable &obj)
bool operator== (const Solvable &lhs, const Solvable &rhs)
bool operator!= (const Solvable &lhs, const Solvable &rhs)
bool operator< (const Solvable &lhs, const Solvable &rhs)
bool identical (Solvable lhs, Solvable rhs)
bool sameNVRA (Solvable lhs, Solvable rhs)
template<class _Res >
bool isKind (const sat::Solvable &solvable_r)

Additional Inherited Members

- Static Protected Member Functions inherited from zypp::sat::detail::PoolMember
static PoolImplmyPool ()

Detailed Description

A Solvable object within the sat Pool.

Note:
Unfortunately 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. Instead the architecture is abused to store "src" and "nosrc" values.

Solvable will hide this inconsistency by treating source packages as an own kind of solvable and map their arch to Arch_noarch.

Definition at line 57 of file Solvable.h.


Member Typedef Documentation


Constructor & Destructor Documentation

zypp::sat::Solvable::Solvable ( )
inline

Default ctor creates noSolvable.

Definition at line 65 of file Solvable.h.

zypp::sat::Solvable::Solvable ( IdType  id_r)
inlineexplicit

PoolImpl ctor.

Definition at line 69 of file Solvable.h.


Member Function Documentation

bool zypp::sat::Solvable::isSystem ( ) const

Return whether this Solvable belongs to the system repo.

Note:
This includes the otherwise hidden systemSolvable.

Reimplemented in zypp::Resolvable.

Definition at line 153 of file Solvable.cc.

bool zypp::sat::Solvable::onSystemByUser ( ) const

Whether this is known to be installed on behalf of a user request.

Note:
This is a hint guessed by evaluating an available install history. Returns false for non-system (uninstalled) solvables, or if no history is available.

Reimplemented in zypp::Resolvable.

Definition at line 159 of file Solvable.cc.

Repository zypp::sat::Solvable::repository ( ) const

The Repository this Solvable belongs to.

Reimplemented in zypp::ResObject.

Definition at line 147 of file Solvable.cc.

std::string zypp::sat::Solvable::lookupStrAttribute ( const SolvAttr attr) const

returns the string attribute value for attr or an empty string if it does not exists.

Definition at line 170 of file Solvable.cc.

std::string zypp::sat::Solvable::lookupStrAttribute ( const SolvAttr attr,
const Locale lang_r 
) const

Definition at line 177 of file Solvable.cc.

unsigned long long zypp::sat::Solvable::lookupNumAttribute ( const SolvAttr attr) const

returns the numeric attribute value for attr or 0 if it does not exists.

Definition at line 196 of file Solvable.cc.

bool zypp::sat::Solvable::lookupBoolAttribute ( const SolvAttr attr) const

returns the boolean attribute value for attr or false if it does not exists.

Definition at line 202 of file Solvable.cc.

detail::IdType zypp::sat::Solvable::lookupIdAttribute ( const SolvAttr attr) const

returns the id attribute value for attr or detail::noId if it does not exists.

Definition at line 208 of file Solvable.cc.

CheckSum zypp::sat::Solvable::lookupCheckSumAttribute ( const SolvAttr attr) const

returns the CheckSum attribute value for attr or an empty CheckSum if ir does not exist.

Definition at line 214 of file Solvable.cc.

OnMediaLocation zypp::sat::Solvable::lookupLocation ( ) const

returns OnMediaLocation data: This is everything we need to download e.g.

an rpm (path, checksum, downloadsize, etc.).

Definition at line 253 of file Solvable.cc.

IdString zypp::sat::Solvable::ident ( ) const

The identifier.

This is the solvables name, except for packages and source packes, prefixed by it's kind.

Reimplemented in zypp::Resolvable.

Definition at line 164 of file Solvable.cc.

ResKind zypp::sat::Solvable::kind ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 295 of file Solvable.cc.

bool zypp::sat::Solvable::isKind ( const ResKind kind_r) const

Test whether a Solvable is of a certain ResKind.

The test is far cheaper than actually retriveing and comparing the kind.

Reimplemented in zypp::Resolvable.

Definition at line 334 of file Solvable.cc.

template<class _Res >
bool zypp::sat::Solvable::isKind ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented in zypp::Resolvable.

Definition at line 166 of file Solvable.h.

template<class _Iterator >
bool zypp::sat::Solvable::isKind ( _Iterator  begin,
_Iterator  end 
)
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 170 of file Solvable.h.

std::string zypp::sat::Solvable::name ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 361 of file Solvable.cc.

Edition zypp::sat::Solvable::edition ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 369 of file Solvable.cc.

Arch zypp::sat::Solvable::arch ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 375 of file Solvable.cc.

IdString zypp::sat::Solvable::vendor ( ) const

Reimplemented in zypp::ResObject.

Definition at line 394 of file Solvable.cc.

bool zypp::sat::Solvable::multiversionInstall ( ) const

Whether different versions of this package can be installed at the same time.

Per default false.

See also:
also ZConfig::multiversion.

Reimplemented in zypp::Resolvable.

Definition at line 389 of file Solvable.cc.

std::string zypp::sat::Solvable::asString ( ) const

String representation "ident-edition.arch" or "noSolvable".

product:openSUSE-11.1.x86_64
autoyast2-2.16.19-0.1.src

Definition at line 503 of file Solvable.cc.

bool zypp::sat::Solvable::identical ( Solvable  rhs) const

Test whether two Solvables have the same content.

Basically the same name, edition, arch, vendor and buildtime.

Definition at line 512 of file Solvable.cc.

bool zypp::sat::Solvable::sameNVRA ( Solvable  rhs) const
inline

Test for same name-version-release.arch.

Definition at line 199 of file Solvable.h.

Capabilities zypp::sat::Solvable::operator[] ( Dep  which_r) const

Reimplemented in zypp::Resolvable.

Definition at line 400 of file Solvable.cc.

Capabilities zypp::sat::Solvable::provides ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 421 of file Solvable.cc.

Capabilities zypp::sat::Solvable::requires ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 426 of file Solvable.cc.

Capabilities zypp::sat::Solvable::conflicts ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 431 of file Solvable.cc.

Capabilities zypp::sat::Solvable::obsoletes ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 436 of file Solvable.cc.

Capabilities zypp::sat::Solvable::recommends ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 441 of file Solvable.cc.

Capabilities zypp::sat::Solvable::suggests ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 446 of file Solvable.cc.

Capabilities zypp::sat::Solvable::enhances ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 451 of file Solvable.cc.

Capabilities zypp::sat::Solvable::supplements ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 456 of file Solvable.cc.

Capabilities zypp::sat::Solvable::prerequires ( ) const

Reimplemented in zypp::Resolvable.

Definition at line 461 of file Solvable.cc.

CapabilitySet zypp::sat::Solvable::providesNamespace ( const std::string &  namespace_r) const

Return the namespaced provides 'namespace([value])[ op edition]' of this Solvable.

Reimplemented in zypp::Resolvable.

Definition at line 470 of file Solvable.cc.

CapabilitySet zypp::sat::Solvable::valuesOfNamespace ( const std::string &  namespace_r) const

Return 'value[ op edition]' for namespaced provides 'namespace(value)[ op edition]'.

Similar to providesNamespace, but the namespace is stripped from the dependencies. This is convenient if the namespace denotes packages that should be looked up. E.g. the weakremover namespace used in a products release package denotes the packages that were dropped from the distribution.

See also:
Product::droplist

Reimplemented in zypp::Resolvable.

Definition at line 484 of file Solvable.cc.

bool zypp::sat::Solvable::supportsLocales ( ) const

Whether this Solvable claims to support locales.

Reimplemented in zypp::ResObject.

Definition at line 596 of file Solvable.cc.

bool zypp::sat::Solvable::supportsLocale ( const Locale locale_r) const

Whether this Solvable supports a specific Locale.

Reimplemented in zypp::ResObject.

Definition at line 602 of file Solvable.cc.

bool zypp::sat::Solvable::supportsLocale ( const LocaleSet locales_r) const

Whether this Solvable supports at least one of the specified locales.

Reimplemented in zypp::ResObject.

Definition at line 608 of file Solvable.cc.

bool zypp::sat::Solvable::supportsRequestedLocales ( ) const

Whether this Solvable supports at least one requested locale.

See also:
Pool::setRequestedLocales

Reimplemented in zypp::ResObject.

Definition at line 616 of file Solvable.cc.

void zypp::sat::Solvable::getSupportedLocales ( LocaleSet locales_r) const

Return the supported locales via locales_r.

Definition at line 619 of file Solvable.cc.

LocaleSet zypp::sat::Solvable::getSupportedLocales ( ) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented in zypp::ResObject.

Definition at line 250 of file Solvable.h.

Solvable zypp::sat::Solvable::nextInPool ( ) const

Return next Solvable in Pool (or noSolvable).

Definition at line 130 of file Solvable.cc.

Solvable zypp::sat::Solvable::nextInRepo ( ) const

Return next Solvable in Repo (or noSolvable).

Definition at line 133 of file Solvable.cc.

_Solvable * zypp::sat::Solvable::get ( ) const

Expert backdoor.

Definition at line 123 of file Solvable.cc.

IdType zypp::sat::Solvable::id ( ) const
inline

Expert backdoor.

Definition at line 297 of file Solvable.h.

zypp::sat::Solvable::base::SafeBool ( ) const
private
bool zypp::sat::Solvable::boolTest ( ) const
inlineprivate

Definition at line 302 of file Solvable.h.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const Solvable obj 
)
related

Stream output

Definition at line 630 of file Solvable.cc.

std::ostream & dumpOn ( std::ostream &  str,
const Solvable obj 
)
related

More verbose stream output including dependencies

Definition at line 646 of file Solvable.cc.

bool operator== ( const Solvable lhs,
const Solvable rhs 
)
related

Definition at line 315 of file Solvable.h.

bool operator!= ( const Solvable lhs,
const Solvable rhs 
)
related

Definition at line 319 of file Solvable.h.

bool operator< ( const Solvable lhs,
const Solvable rhs 
)
related

Definition at line 323 of file Solvable.h.

bool identical ( Solvable  lhs,
Solvable  rhs 
)
related

Test for same content.

Definition at line 327 of file Solvable.h.

bool sameNVRA ( Solvable  lhs,
Solvable  rhs 
)
related

Test for same name version release and arch.

Definition at line 331 of file Solvable.h.

template<class _Res >
bool isKind ( const sat::Solvable solvable_r)
related

Test whether a sat::Solvable is of a certain Kind.

Definition at line 389 of file Solvable.h.


Member Data Documentation

const Solvable zypp::sat::Solvable::noSolvable
static

Represents no Solvable.

Definition at line 74 of file Solvable.h.

IdType zypp::sat::Solvable::_id
private

Definition at line 304 of file Solvable.h.


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