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

Selectable implementation. More...

#include <SelectableImpl.h>

List of all members.

Public Types

typedef
SelectableTraits::AvailableItemSet 
AvailableItemSet
typedef
SelectableTraits::available_iterator 
available_iterator
typedef
SelectableTraits::available_const_iterator 
available_const_iterator
typedef
SelectableTraits::available_size_type 
available_size_type
typedef
SelectableTraits::InstalledItemSet 
InstalledItemSet
typedef
SelectableTraits::installed_iterator 
installed_iterator
typedef
SelectableTraits::installed_const_iterator 
installed_const_iterator
typedef
SelectableTraits::installed_size_type 
installed_size_type
typedef SelectableTraits::PickList PickList

Public Member Functions

template<class _Iterator>
 Impl (const ResObject::Kind &kind_r, const std::string &name_r, _Iterator begin_r, _Iterator end_r)
IdString ident () const
ResObject::Kind 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
bool identicalAvailable (const PoolItem &rhs) const
bool identicalInstalled (const PoolItem &rhs) const
PoolItem identicalAvailableObj (const PoolItem &rhs) const
PoolItem identicalInstalledObj (const PoolItem &rhs) const
PoolItem theObj () const
 Best among all objects.
bool availableEmpty () const
available_size_type availableSize () const
available_const_iterator availableBegin () const
available_const_iterator availableEnd () const
bool installedEmpty () const
installed_size_type installedSize () const
installed_iterator installedBegin () const
installed_iterator installedEnd () const
const PickListpicklist () const
bool picklistEmpty () const
picklist_size_type picklistSize () const
picklist_iterator picklistBegin () const
picklist_iterator picklistEnd () 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.

Private Member Functions

PoolItem transactingInstalled () const
PoolItem transactingCandidate () const
PoolItem defaultCandidate () const
bool allCandidatesLocked () const
bool allInstalledLocked () const

Private Attributes

const IdString _ident
const ResObject::Kind _kind
const std::string _name
InstalledItemSet _installedItems
AvailableItemSet _availableItems
PoolItem _candidate
 The object selected by setCandidateObj() method.
scoped_ptr< PickList_picklistPtr
 lazy initialized picklist

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Selectable::Impl &obj)
std::ostream & dumpOn (std::ostream &str, const Selectable::Impl &obj)


Detailed Description

Selectable implementation.

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

Definition at line 42 of file SelectableImpl.h.


Member Typedef Documentation

Definition at line 46 of file SelectableImpl.h.

Definition at line 47 of file SelectableImpl.h.

Definition at line 48 of file SelectableImpl.h.

Definition at line 49 of file SelectableImpl.h.

Definition at line 51 of file SelectableImpl.h.

Definition at line 52 of file SelectableImpl.h.

Definition at line 53 of file SelectableImpl.h.

Definition at line 54 of file SelectableImpl.h.

Definition at line 56 of file SelectableImpl.h.


Constructor & Destructor Documentation

template<class _Iterator>
zypp::ui::Selectable::Impl::Impl ( const ResObject::Kind kind_r,
const std::string &  name_r,
_Iterator  begin_r,
_Iterator  end_r 
) [inline]

Definition at line 60 of file SelectableImpl.h.

References _availableItems, _installedItems, and for_.


Member Function Documentation

IdString zypp::ui::Selectable::Impl::ident (  )  const [inline]

Definition at line 79 of file SelectableImpl.h.

References _ident.

Referenced by multiversionInstall(), pickStatus(), and setPickStatus().

ResObject::Kind zypp::ui::Selectable::Impl::kind (  )  const [inline]

Definition at line 83 of file SelectableImpl.h.

References _kind.

Referenced by dumpOn(), operator<<(), pickStatus(), and status().

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

Definition at line 87 of file SelectableImpl.h.

References _name.

Referenced by dumpOn(), and operator<<().

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

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

PoolItem zypp::ui::Selectable::Impl::installedObj (  )  const [inline]

Installed object (transacting ot highest version).

Definition at line 97 of file SelectableImpl.h.

References _installedItems, installedEmpty(), and transactingInstalled().

Referenced by dumpOn(), modifiedBy(), status(), theObj(), and updateCandidateObj().

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 109 of file SelectableImpl.h.

References _candidate, defaultCandidate(), and transactingCandidate().

Referenced by dumpOn(), hasLicenceConfirmed(), isBroken(), isRelevant(), isSatisfied(), isUndetermined(), modifiedBy(), operator<<(), setLicenceConfirmed(), status(), and theObj().

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 374 of file SelectableImpl.cc.

References _candidate, availableBegin(), availableEnd(), for_, zypp::ResStatus::maySetTransact(), zypp::ResStatus::setTransact(), zypp::PoolItem::status(), and transactingCandidate().

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 128 of file SelectableImpl.h.

References availableBegin(), availableEnd(), and for_.

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 144 of file SelectableImpl.h.

References zypp::Arch_noarch, availableBegin(), defaultCandidate(), identicalInstalled(), installedEmpty(), installedObj(), zypp::VendorAttr::instance(), zypp::ResPool::instance(), and multiversionInstall().

Referenced by dumpOn().

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.

Definition at line 179 of file SelectableImpl.h.

References availableBegin(), availableEnd(), zypp::sat::Solvable::edition(), for_, and zypp::PoolItem::satSolvable().

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 191 of file SelectableImpl.h.

References identicalAvailableObj().

Referenced by picklist().

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 195 of file SelectableImpl.h.

References identicalInstalledObj().

Referenced by pickInstall(), and updateCandidateObj().

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 199 of file SelectableImpl.h.

References _availableItems, availableEmpty(), and for_.

Referenced by identicalAvailable().

PoolItem zypp::ui::Selectable::Impl::identicalInstalledObj ( const PoolItem rhs  )  const [inline]

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 213 of file SelectableImpl.h.

References _installedItems, for_, and installedEmpty().

Referenced by identicalInstalled().

PoolItem zypp::ui::Selectable::Impl::theObj (  )  const [inline]

Best among all objects.

Definition at line 227 of file SelectableImpl.h.

References candidateObj(), and installedObj().

bool zypp::ui::Selectable::Impl::availableEmpty (  )  const [inline]

Definition at line 237 of file SelectableImpl.h.

References _availableItems.

Referenced by dumpOn(), identicalAvailableObj(), and isUnmaintained().

available_size_type zypp::ui::Selectable::Impl::availableSize (  )  const [inline]

Definition at line 240 of file SelectableImpl.h.

References _availableItems.

Referenced by dumpOn(), and operator<<().

available_const_iterator zypp::ui::Selectable::Impl::availableBegin (  )  const [inline]

available_const_iterator zypp::ui::Selectable::Impl::availableEnd (  )  const [inline]

bool zypp::ui::Selectable::Impl::installedEmpty (  )  const [inline]

installed_size_type zypp::ui::Selectable::Impl::installedSize (  )  const [inline]

Definition at line 254 of file SelectableImpl.h.

References _installedItems.

Referenced by dumpOn(), and operator<<().

installed_iterator zypp::ui::Selectable::Impl::installedBegin (  )  const [inline]

installed_iterator zypp::ui::Selectable::Impl::installedEnd (  )  const [inline]

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

bool zypp::ui::Selectable::Impl::picklistEmpty (  )  const [inline]

Definition at line 281 of file SelectableImpl.h.

References picklist().

Referenced by dumpOn().

picklist_size_type zypp::ui::Selectable::Impl::picklistSize (  )  const [inline]

Definition at line 284 of file SelectableImpl.h.

References picklist().

Referenced by dumpOn().

picklist_iterator zypp::ui::Selectable::Impl::picklistBegin (  )  const [inline]

Definition at line 287 of file SelectableImpl.h.

References picklist().

Referenced by dumpOn().

picklist_iterator zypp::ui::Selectable::Impl::picklistEnd (  )  const [inline]

Definition at line 290 of file SelectableImpl.h.

References picklist().

Referenced by dumpOn().

bool zypp::ui::Selectable::Impl::isUnmaintained (  )  const [inline]

Definition at line 295 of file SelectableImpl.h.

References availableEmpty().

bool zypp::ui::Selectable::Impl::multiversionInstall (  )  const [inline]

Definition at line 298 of file SelectableImpl.h.

References ident(), and zypp::sat::Pool::instance().

Referenced by defaultCandidate(), dumpOn(), setPickStatus(), and updateCandidateObj().

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

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

Definition at line 423 of file SelectableImpl.cc.

References zypp::ui::S_Del, zypp::ui::S_KeepInstalled, and setPickStatus().

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

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

bool zypp::ui::Selectable::Impl::isUndetermined (  )  const [inline]

Definition at line 311 of file SelectableImpl.h.

References candidateObj(), and zypp::PoolItem::isUndetermined().

bool zypp::ui::Selectable::Impl::isRelevant (  )  const [inline]

Definition at line 316 of file SelectableImpl.h.

References candidateObj(), and zypp::PoolItem::isRelevant().

bool zypp::ui::Selectable::Impl::isSatisfied (  )  const [inline]

Definition at line 321 of file SelectableImpl.h.

References candidateObj(), and zypp::PoolItem::isSatisfied().

bool zypp::ui::Selectable::Impl::isBroken (  )  const [inline]

Definition at line 326 of file SelectableImpl.h.

References candidateObj(), and zypp::PoolItem::isBroken().

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

bool zypp::ui::Selectable::Impl::hasLicenceConfirmed (  )  const [inline]

Return value of LicenceConfirmed bit.

Definition at line 336 of file SelectableImpl.h.

References candidateObj(), zypp::ResStatus::isLicenceConfirmed(), and zypp::PoolItem::status().

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

Set LicenceConfirmed bit.

Definition at line 340 of file SelectableImpl.h.

References candidateObj(), zypp::ResStatus::setLicenceConfirmed(), and zypp::PoolItem::status().

PoolItem zypp::ui::Selectable::Impl::transactingInstalled (  )  const [inline, private]

Definition at line 344 of file SelectableImpl.h.

References for_, installedBegin(), and installedEnd().

Referenced by installedObj().

PoolItem zypp::ui::Selectable::Impl::transactingCandidate (  )  const [inline, private]

Definition at line 354 of file SelectableImpl.h.

References availableBegin(), availableEnd(), and for_.

Referenced by candidateObj(), and setCandidate().

PoolItem zypp::ui::Selectable::Impl::defaultCandidate (  )  const [inline, private]

bool zypp::ui::Selectable::Impl::allCandidatesLocked (  )  const [inline, private]

Definition at line 401 of file SelectableImpl.h.

References _availableItems, availableBegin(), and availableEnd().

Referenced by status().

bool zypp::ui::Selectable::Impl::allInstalledLocked (  )  const [inline, private]

Definition at line 412 of file SelectableImpl.h.

References _installedItems, installedBegin(), and installedEnd().

Referenced by status().


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const Selectable::Impl obj 
) [related]

Stream output

Definition at line 438 of file SelectableImpl.h.

References availableSize(), candidateObj(), installedSize(), kind(), name(), and status().

std::ostream & dumpOn ( std::ostream &  str,
const Selectable::Impl obj 
) [related]


Member Data Documentation

Definition at line 425 of file SelectableImpl.h.

Referenced by ident().

Definition at line 426 of file SelectableImpl.h.

Referenced by kind().

const std::string zypp::ui::Selectable::Impl::_name [private]

Definition at line 427 of file SelectableImpl.h.

Referenced by name().

The object selected by setCandidateObj() method.

Definition at line 431 of file SelectableImpl.h.

Referenced by candidateObj(), and setCandidate().

scoped_ptr<PickList> zypp::ui::Selectable::Impl::_picklistPtr [mutable, private]

lazy initialized picklist

Definition at line 433 of file SelectableImpl.h.

Referenced by picklist().


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

Generated on Tue May 5 14:49:59 2015 for libzypp by  doxygen 1.5.6