libzypp: zypp::ui::Selectable::Impl Struct Reference

libzypp 17.38.6

zypp::ui::Selectable::Impl Struct Reference

Selectable implementation. More...

`#include <zypp/ui/SelectableImpl.h>`

## Public Types
using | AvailableItemSet = SelectableTraits::AvailableItemSet
using | available_iterator = SelectableTraits::available_iterator
using | available_const_iterator = SelectableTraits::available_const_iterator
using | available_size_type = SelectableTraits::available_size_type
using | InstalledItemSet = SelectableTraits::InstalledItemSet
using | installed_iterator = SelectableTraits::installed_iterator
using | installed_const_iterator = SelectableTraits::installed_const_iterator
using | installed_size_type = SelectableTraits::installed_size_type
using | PickList = SelectableTraits::PickList

## Public Member Functions
template<class TIterator>
| Impl (const ResKind &kind_r, const std::string &name_r, TIterator begin_r, TIterator end_r)
IdString | ident () const
ResKind | kind () const
const std::string & | name () const
Status | status () const
bool | setStatus (Status state_r, ResStatus::TransactByValue causer_r)
PoolItem | installedObj () const
| Installed object (transacting ot highest version).
PoolItem | candidateObj () const
| Best among available objects.
PoolItem | setCandidate (const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r)
| Set a userCandidate (out of available objects).
PoolItem | candidateObjFrom (Repository repo_r) const
| The best candidate provided by a specific Repository, if there is one.
PoolItem | updateCandidateObj () const
| The best candidate for update, if there is one.
PoolItem | highestAvailableVersionObj () const
| Simply the highest available version, ignoring priorities and policies.
bool | identIsAutoInstalled () const
| Whether this ident is flagged as AutoInstalled.
bool | identicalAvailable (const PoolItem &rhs) const
| `True` if rhs is installed and one with the same content is available.
bool | identicalInstalled (const PoolItem &rhs) const
| `True` if rhs has the same content as an installed one.
PoolItem | identicalAvailableObj (const PoolItem &rhs) const
| Return an available Object with the same content as `rhs`.
PoolItem | identicalInstalledObj (const PoolItem &rhs) const
| \Return an installed Object with the same content as `rhs`.
PoolItem | theObj () const
| Best among all objects.
std::vector< std::string > | supersededBy () const
bool | availableEmpty () const
available_size_type | availableSize () const
available_iterator | availableBegin () const
available_iterator | availableEnd () const
Iterable< available_iterator > | available () const
bool | installedEmpty () const
installed_size_type | installedSize () const
installed_iterator | installedBegin () const
installed_iterator | installedEnd () const
Iterable< installed_iterator > | installed () const
const PickList & | picklist () const
bool | picklistEmpty () const
picklist_size_type | picklistSize () const
picklist_iterator | picklistBegin () const
picklist_iterator | picklistEnd () const
bool | hasBlacklisted () const
bool | hasBlacklistedInstalled () const
bool | hasRetracted () const
bool | hasRetractedInstalled () const
bool | hasPtf () const
bool | hasPtfInstalled () const
bool | isUnmaintained () const
bool | multiversionInstall () const
bool | pickInstall (const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
bool | pickDelete (const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
Status | pickStatus (const PoolItem &pi_r) const
bool | setPickStatus (const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r)
bool | isUndetermined () const
bool | isRelevant () const
bool | isSatisfied () const
bool | isBroken () const
ResStatus::TransactByValue | modifiedBy () const
| Return who caused the modification.
bool | hasLicenceConfirmed () const
| Return value of LicenceConfirmed bit.
void | setLicenceConfirmed (bool val_r)
| Set LicenceConfirmed bit.
bool | hasLocks () const
| True if it includes locked items (don't mix this with the locked status).

## Private Member Functions
PoolItem | transactingInstalled () const
PoolItem | transactingCandidate () const
PoolItem | defaultCandidate () const
bool | allCandidatesLocked () const
bool | allInstalledLocked () const

## Private Attributes
const IdString | _ident
const ResKind | _kind
const std::string | _name
InstalledItemSet | _installedItems
AvailableItemSet | _availableItems
PoolItem | _candidate
| The object selected by setCandidateObj() method.
scoped_ptr< PickList > | _picklistPtr
| lazy initialized picklist

## Detailed Description

Selectable implementation.

Note
  Implementation is based in PoolItem, just the Selectable inteface restricts them to ResObject::constPtr.

Definition at line 43 of file SelectableImpl.h.

## Member Typedef Documentation

## ◆ AvailableItemSet

using zypp::ui::Selectable::Impl::AvailableItemSet = SelectableTraits::AvailableItemSet

Definition at line 47 of file SelectableImpl.h.

## ◆ available_iterator

using zypp::ui::Selectable::Impl::available_iterator = SelectableTraits::available_iterator

Definition at line 48 of file SelectableImpl.h.

## ◆ available_const_iterator

using zypp::ui::Selectable::Impl::available_const_iterator = SelectableTraits::available_const_iterator

Definition at line 49 of file SelectableImpl.h.

## ◆ available_size_type

using zypp::ui::Selectable::Impl::available_size_type = SelectableTraits::available_size_type

Definition at line 50 of file SelectableImpl.h.

## ◆ InstalledItemSet

using zypp::ui::Selectable::Impl::InstalledItemSet = SelectableTraits::InstalledItemSet

Definition at line 52 of file SelectableImpl.h.

## ◆ installed_iterator

using zypp::ui::Selectable::Impl::installed_iterator = SelectableTraits::installed_iterator

Definition at line 53 of file SelectableImpl.h.

## ◆ installed_const_iterator

using zypp::ui::Selectable::Impl::installed_const_iterator = SelectableTraits::installed_const_iterator

Definition at line 54 of file SelectableImpl.h.

## ◆ installed_size_type

using zypp::ui::Selectable::Impl::installed_size_type = SelectableTraits::installed_size_type

Definition at line 55 of file SelectableImpl.h.

## ◆ PickList

using zypp::ui::Selectable::Impl::PickList = SelectableTraits::PickList

Definition at line 57 of file SelectableImpl.h.

## Constructor & Destructor Documentation

## ◆ Impl()

template<class TIterator>

zypp::ui::Selectable::Impl::Impl | ( | const ResKind & | kind_r,
|  | const std::string & | name_r,
|  | TIterator | begin_r,
|  | TIterator | end_r )
| inline

Definition at line 61 of file SelectableImpl.h.

## Member Function Documentation

## ◆ ident()

IdString zypp::ui::Selectable::Impl::ident | ( |  | ) | const
| inline

Definition at line 80 of file SelectableImpl.h.

## ◆ kind()

ResKind zypp::ui::Selectable::Impl::kind | ( |  | ) | const
| inline

Definition at line 84 of file SelectableImpl.h.

## ◆ name()

const std::string & zypp::ui::Selectable::Impl::name | ( |  | ) | const
| inline

Definition at line 88 of file SelectableImpl.h.

## ◆ status()

Status zypp::ui::Selectable::Impl::status | ( |  | ) | const

Definition at line 322 of file SelectableImpl.cc.

## ◆ setStatus()

bool zypp::ui::Selectable::Impl::setStatus | ( | Status | state_r,
|  | ResStatus::TransactByValue | causer_r )

Definition at line 355 of file SelectableImpl.cc.

## ◆ installedObj()

PoolItem zypp::ui::Selectable::Impl::installedObj | ( |  | ) | const
| inline

Installed object (transacting ot highest version).

Definition at line 98 of file SelectableImpl.h.

## ◆ candidateObj()

PoolItem zypp::ui::Selectable::Impl::candidateObj | ( |  | ) | const
| inline

Best among available objects.

The transacting candidate or the one scheduled to receive the transact bit.

Definition at line 110 of file SelectableImpl.h.

## ◆ setCandidate()

PoolItem zypp::ui::Selectable::Impl::setCandidate | ( | const PoolItem & | newCandidate_r,
|  | ResStatus::TransactByValue | causer_r )

Set a userCandidate (out of available objects).

Returns
  The new userCandidate or NULL if choice was invalid (not among availableObjs).

Definition at line 396 of file SelectableImpl.cc.

## ◆ candidateObjFrom()

PoolItem zypp::ui::Selectable::Impl::candidateObjFrom | ( | Repository | repo_r | ) | const
| inline

The best candidate provided by a specific Repository, if there is one.

In contrary to candidateObj, this may return no item even if there are available objects. This simply means the Repository does not provide this object.

Definition at line 129 of file SelectableImpl.h.

## ◆ updateCandidateObj()

PoolItem zypp::ui::Selectable::Impl::updateCandidateObj | ( |  | ) | const
| inline

The best candidate for update, if there is one.

In contrary to candidateObj, this may return no item even if there are available objects. This simply means the best object is already installed, and all available objects violate at least one update policy.

Definition at line 147 of file SelectableImpl.h.

## ◆ highestAvailableVersionObj()

PoolItem zypp::ui::Selectable::Impl::highestAvailableVersionObj | ( |  | ) | const
| inline

Simply the highest available version, ignoring priorities and policies.

It's doubtful whether solely looking at the version makes a good candidate, but apps ask for it. Beware that different vendors may use different (uncomparable) version schemata.

Note
  Avoids to return blacklisted items.

Definition at line 181 of file SelectableImpl.h.

## ◆ identIsAutoInstalled()

bool zypp::ui::Selectable::Impl::identIsAutoInstalled | ( |  | ) | const
| inline

Whether this ident is flagged as AutoInstalled.

Definition at line 200 of file SelectableImpl.h.

## ◆ identicalAvailable()

bool zypp::ui::Selectable::Impl::identicalAvailable | ( | const PoolItem & | rhs | ) | const
| inline

`True` if rhs is installed and one with the same content is available.

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

See also
  sat::Solvable::identical

Definition at line 204 of file SelectableImpl.h.

## ◆ identicalInstalled()

bool zypp::ui::Selectable::Impl::identicalInstalled | ( | const PoolItem & | rhs | ) | const
| inline

`True` if rhs has the same content as an installed one.

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

See also
  sat::Solvable::identical

Definition at line 208 of file SelectableImpl.h.

## ◆ identicalAvailableObj()

PoolItem zypp::ui::Selectable::Impl::identicalAvailableObj | ( | const PoolItem & | rhs | ) | const
| inline

Return an available Object with the same content as `rhs`.

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

See also
  sat::Solvable::identical

Definition at line 212 of file SelectableImpl.h.

## ◆ identicalInstalledObj()

PoolItem zypp::ui::Selectable::Impl::identicalInstalledObj | ( | const PoolItem & | rhs | ) | const
| inline

\Return an installed Object with the same content as `rhs`.

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

See also
  sat::Solvable::identical

Definition at line 226 of file SelectableImpl.h.

## ◆ theObj()

PoolItem zypp::ui::Selectable::Impl::theObj | ( |  | ) | const
| inline

Best among all objects.

Definition at line 240 of file SelectableImpl.h.

## ◆ supersededBy()

std::vector< std::string > zypp::ui::Selectable::Impl::supersededBy | ( |  | ) | const
| inline

Definition at line 248 of file SelectableImpl.h.

## ◆ availableEmpty()

bool zypp::ui::Selectable::Impl::availableEmpty | ( |  | ) | const
| inline

Definition at line 263 of file SelectableImpl.h.

## ◆ availableSize()

available_size_type zypp::ui::Selectable::Impl::availableSize | ( |  | ) | const
| inline

Definition at line 266 of file SelectableImpl.h.

## ◆ availableBegin()

available_iterator zypp::ui::Selectable::Impl::availableBegin | ( |  | ) | const
| inline

Definition at line 269 of file SelectableImpl.h.

## ◆ availableEnd()

available_iterator zypp::ui::Selectable::Impl::availableEnd | ( |  | ) | const
| inline

Definition at line 272 of file SelectableImpl.h.

## ◆ available()

Iterable< available_iterator > zypp::ui::Selectable::Impl::available | ( |  | ) | const
| inline

Definition at line 275 of file SelectableImpl.h.

## ◆ installedEmpty()

bool zypp::ui::Selectable::Impl::installedEmpty | ( |  | ) | const
| inline

Definition at line 280 of file SelectableImpl.h.

## ◆ installedSize()

installed_size_type zypp::ui::Selectable::Impl::installedSize | ( |  | ) | const
| inline

Definition at line 283 of file SelectableImpl.h.

## ◆ installedBegin()

installed_iterator zypp::ui::Selectable::Impl::installedBegin | ( |  | ) | const
| inline

Definition at line 286 of file SelectableImpl.h.

## ◆ installedEnd()

installed_iterator zypp::ui::Selectable::Impl::installedEnd | ( |  | ) | const
| inline

Definition at line 289 of file SelectableImpl.h.

## ◆ installed()

Iterable< installed_iterator > zypp::ui::Selectable::Impl::installed | ( |  | ) | const
| inline

Definition at line 292 of file SelectableImpl.h.

## ◆ picklist()

const PickList & zypp::ui::Selectable::Impl::picklist | ( |  | ) | const
| inline

Definition at line 297 of file SelectableImpl.h.

## ◆ picklistEmpty()

bool zypp::ui::Selectable::Impl::picklistEmpty | ( |  | ) | const
| inline

Definition at line 313 of file SelectableImpl.h.

## ◆ picklistSize()

picklist_size_type zypp::ui::Selectable::Impl::picklistSize | ( |  | ) | const
| inline

Definition at line 316 of file SelectableImpl.h.

## ◆ picklistBegin()

picklist_iterator zypp::ui::Selectable::Impl::picklistBegin | ( |  | ) | const
| inline

Definition at line 319 of file SelectableImpl.h.

## ◆ picklistEnd()

picklist_iterator zypp::ui::Selectable::Impl::picklistEnd | ( |  | ) | const
| inline

Definition at line 322 of file SelectableImpl.h.

## ◆ hasBlacklisted()

bool zypp::ui::Selectable::Impl::hasBlacklisted | ( |  | ) | const
| inline

Definition at line 326 of file SelectableImpl.h.

## ◆ hasBlacklistedInstalled()

bool zypp::ui::Selectable::Impl::hasBlacklistedInstalled | ( |  | ) | const
| inline

Definition at line 331 of file SelectableImpl.h.

## ◆ hasRetracted()

bool zypp::ui::Selectable::Impl::hasRetracted | ( |  | ) | const
| inline

Definition at line 340 of file SelectableImpl.h.

## ◆ hasRetractedInstalled()

bool zypp::ui::Selectable::Impl::hasRetractedInstalled | ( |  | ) | const
| inline

Definition at line 351 of file SelectableImpl.h.

## ◆ hasPtf()

bool zypp::ui::Selectable::Impl::hasPtf | ( |  | ) | const
| inline

Definition at line 360 of file SelectableImpl.h.

## ◆ hasPtfInstalled()

bool zypp::ui::Selectable::Impl::hasPtfInstalled | ( |  | ) | const
| inline

Definition at line 371 of file SelectableImpl.h.

## ◆ isUnmaintained()

bool zypp::ui::Selectable::Impl::isUnmaintained | ( |  | ) | const
| inline

Definition at line 381 of file SelectableImpl.h.

## ◆ multiversionInstall()

bool zypp::ui::Selectable::Impl::multiversionInstall | ( |  | ) | const
| inline

Definition at line 384 of file SelectableImpl.h.

## ◆ pickInstall()

bool zypp::ui::Selectable::Impl::pickInstall | ( | const PoolItem & | pi_r,
|  | ResStatus::TransactByValue | causer_r,
|  | bool | yesno_r )

Definition at line 438 of file SelectableImpl.cc.

## ◆ pickDelete()

bool zypp::ui::Selectable::Impl::pickDelete | ( | const PoolItem & | pi_r,
|  | ResStatus::TransactByValue | causer_r,
|  | bool | yesno_r )

Definition at line 445 of file SelectableImpl.cc.

## ◆ pickStatus()

Status zypp::ui::Selectable::Impl::pickStatus | ( | const PoolItem & | pi_r | ) | const

Definition at line 573 of file SelectableImpl.cc.

## ◆ setPickStatus()

bool zypp::ui::Selectable::Impl::setPickStatus | ( | const PoolItem & | pi_r,
|  | Status | state_r,
|  | ResStatus::TransactByValue | causer_r )

Definition at line 450 of file SelectableImpl.cc.

## ◆ isUndetermined()

bool zypp::ui::Selectable::Impl::isUndetermined | ( |  | ) | const
| inline

Definition at line 404 of file SelectableImpl.h.

## ◆ isRelevant()

bool zypp::ui::Selectable::Impl::isRelevant | ( |  | ) | const
| inline

Definition at line 409 of file SelectableImpl.h.

## ◆ isSatisfied()

bool zypp::ui::Selectable::Impl::isSatisfied | ( |  | ) | const
| inline

Definition at line 414 of file SelectableImpl.h.

## ◆ isBroken()

bool zypp::ui::Selectable::Impl::isBroken | ( |  | ) | const
| inline

Definition at line 419 of file SelectableImpl.h.

## ◆ modifiedBy()

ResStatus::TransactByValue zypp::ui::Selectable::Impl::modifiedBy | ( |  | ) | const

Return who caused the modification.

Definition at line 642 of file SelectableImpl.cc.

## ◆ hasLicenceConfirmed()

bool zypp::ui::Selectable::Impl::hasLicenceConfirmed | ( |  | ) | const
| inline

Return value of LicenceConfirmed bit.

Definition at line 429 of file SelectableImpl.h.

## ◆ setLicenceConfirmed()

void zypp::ui::Selectable::Impl::setLicenceConfirmed | ( | bool | val_r | ) |
| inline

Set LicenceConfirmed bit.

Definition at line 433 of file SelectableImpl.h.

## ◆ hasLocks()

bool zypp::ui::Selectable::Impl::hasLocks | ( |  | ) | const
| inline

True if it includes locked items (don't mix this with the locked status).

This is also `true` for partially locked items, where only specific versions are locked.

See also
  locked

Definition at line 437 of file SelectableImpl.h.

## ◆ transactingInstalled()

PoolItem zypp::ui::Selectable::Impl::transactingInstalled | ( |  | ) | const
| inlineprivate

Definition at line 453 of file SelectableImpl.h.

## ◆ transactingCandidate()

PoolItem zypp::ui::Selectable::Impl::transactingCandidate | ( |  | ) | const
| inlineprivate

Definition at line 463 of file SelectableImpl.h.

## ◆ defaultCandidate()

PoolItem zypp::ui::Selectable::Impl::defaultCandidate | ( |  | ) | const
| inlineprivate

Definition at line 473 of file SelectableImpl.h.

## ◆ allCandidatesLocked()

bool zypp::ui::Selectable::Impl::allCandidatesLocked | ( |  | ) | const
| inlineprivate

Definition at line 508 of file SelectableImpl.h.

## ◆ allInstalledLocked()

bool zypp::ui::Selectable::Impl::allInstalledLocked | ( |  | ) | const
| inlineprivate

Definition at line 518 of file SelectableImpl.h.

## Member Data Documentation

## ◆ _ident

const IdString zypp::ui::Selectable::Impl::_ident
| private

Definition at line 530 of file SelectableImpl.h.

## ◆ _kind

const ResKind zypp::ui::Selectable::Impl::_kind
| private

Definition at line 531 of file SelectableImpl.h.

## ◆ _name

const std::string zypp::ui::Selectable::Impl::_name
| private

Definition at line 532 of file SelectableImpl.h.

## ◆ _installedItems

InstalledItemSet zypp::ui::Selectable::Impl::_installedItems
| private

Definition at line 533 of file SelectableImpl.h.

## ◆ _availableItems

AvailableItemSet zypp::ui::Selectable::Impl::_availableItems
| private

Definition at line 534 of file SelectableImpl.h.

## ◆ _candidate

PoolItem zypp::ui::Selectable::Impl::_candidate
| private

The object selected by setCandidateObj() method.

Definition at line 536 of file SelectableImpl.h.

## ◆ _picklistPtr

scoped_ptr<PickList> zypp::ui::Selectable::Impl::_picklistPtr
| mutableprivate

lazy initialized picklist

Definition at line 538 of file SelectableImpl.h.

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

- zypp/ui/SelectableImpl.h
- zypp/ui/SelectableImpl.cc