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

Selectable implementation. More...

#include <SelectableImpl.h>

List of all members.

Public Types

typedef
SelectableTraits::AvialableItemSet 
AvialableItemSet
typedef
SelectableTraits::availableItem_iterator 
availableItem_iterator
typedef
SelectableTraits::availableItem_const_iterator 
availableItem_const_iterator
typedef
SelectableTraits::availableItem_size_type 
availableItem_size_type

Public Member Functions

 Impl (const ResObject::Kind &kind_r, const std::string &name_r, const PoolItem &installedItem_r, availableItem_const_iterator availableBegin_r, availableItem_const_iterator availableEnd_r)
ResObject::Kind kind () const
const std::string & name () const
Status status () const
bool set_status (const Status state_r)
PoolItem installedObj () const
 Installed object.
PoolItem candidateObj () const
 Best among available objects.
PoolItem setCandidate (ResObject::constPtr byUser_r)
 Set a userCandidate (out of available objects).
PoolItem theObj () const
 Best among all objects.
availableItem_size_type availableObjs () const
availableItem_const_iterator availableBegin () const
availableItem_const_iterator availableEnd () 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 transactingCandidate () const
PoolItem defaultCandidate () const
bool allCandidatesLocked () const

Private Attributes

ResObject::Kind _kind
std::string _name
PoolItem _installedItem
AvialableItemSet _availableItems
PoolItem _candidate

Friends

std::ostream & operator<< (std::ostream &str, const Selectable::Impl &obj)
 Stream output.


Detailed Description

Selectable implementation.

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

Definition at line 37 of file SelectableImpl.h.


Member Typedef Documentation

typedef SelectableTraits::AvialableItemSet zypp::ui::Selectable::Impl::AvialableItemSet

Definition at line 43 of file SelectableImpl.h.

typedef SelectableTraits::availableItem_iterator zypp::ui::Selectable::Impl::availableItem_iterator

Definition at line 44 of file SelectableImpl.h.

typedef SelectableTraits::availableItem_const_iterator zypp::ui::Selectable::Impl::availableItem_const_iterator

Definition at line 45 of file SelectableImpl.h.

typedef SelectableTraits::availableItem_size_type zypp::ui::Selectable::Impl::availableItem_size_type

Definition at line 46 of file SelectableImpl.h.


Constructor & Destructor Documentation

zypp::ui::Selectable::Impl::Impl ( const ResObject::Kind kind_r,
const std::string &  name_r,
const PoolItem installedItem_r,
availableItem_const_iterator  availableBegin_r,
availableItem_const_iterator  availableEnd_r 
) [inline]

Definition at line 49 of file SelectableImpl.h.

References setCandidate().


Member Function Documentation

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

Definition at line 64 of file SelectableImpl.h.

References _kind.

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

Definition at line 68 of file SelectableImpl.h.

References _name.

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

Definition at line 166 of file SelectableImpl.cc.

References allCandidatesLocked(), candidateObj(), installedObj(), zypp::ResStatus::isByUser(), zypp::ResStatus::isLocked(), zypp::ui::S_AutoDel, zypp::ui::S_AutoInstall, zypp::ui::S_AutoUpdate, zypp::ui::S_Del, zypp::ui::S_Install, zypp::ui::S_KeepInstalled, zypp::ui::S_NoInst, zypp::ui::S_Protected, zypp::ui::S_Taboo, zypp::ui::S_Update, zypp::PoolItem_Ref::status(), and zypp::ResStatus::transacts().

Referenced by modifiedBy().

bool zypp::ui::Selectable::Impl::set_status ( const Status  state_r  ) 

Definition at line 191 of file SelectableImpl.cc.

References zypp::ui::S_AutoDel, zypp::ui::S_AutoInstall, zypp::ui::S_AutoUpdate, zypp::ui::S_Del, zypp::ui::S_Install, zypp::ui::S_KeepInstalled, zypp::ui::S_NoInst, zypp::ui::S_Protected, zypp::ui::S_Taboo, and zypp::ui::S_Update.

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

Installed object.

Definition at line 78 of file SelectableImpl.h.

References _installedItem.

Referenced by defaultCandidate(), modifiedBy(), and status().

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

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

Referenced by hasLicenceConfirmed(), modifiedBy(), setLicenceConfirmed(), status(), and theObj().

PoolItem zypp::ui::Selectable::Impl::setCandidate ( ResObject::constPtr  byUser_r  ) 

Set a userCandidate (out of available objects).

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

Definition at line 232 of file SelectableImpl.cc.

References _candidate, availableBegin(), availableEnd(), zypp::ResStatus::setTransact(), zypp::PoolItem_Ref::status(), transactingCandidate(), and zypp::ResStatus::USER.

Referenced by Impl().

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

Best among all objects.

Definition at line 103 of file SelectableImpl.h.

References _installedItem, and candidateObj().

availableItem_size_type zypp::ui::Selectable::Impl::availableObjs (  )  const [inline]

Definition at line 110 of file SelectableImpl.h.

References _availableItems.

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

Definition at line 114 of file SelectableImpl.h.

References _availableItems.

Referenced by allCandidatesLocked(), defaultCandidate(), zypp::ui::StatusHelper::lockCandidates(), zypp::ui::StatusHelper::resetTransactingCandidates(), setCandidate(), transactingCandidate(), and zypp::ui::StatusHelper::unlockCandidates().

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

Definition at line 118 of file SelectableImpl.h.

References _availableItems.

Referenced by allCandidatesLocked(), defaultCandidate(), zypp::ui::StatusHelper::lockCandidates(), zypp::ui::StatusHelper::resetTransactingCandidates(), setCandidate(), transactingCandidate(), and zypp::ui::StatusHelper::unlockCandidates().

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

Return who caused the modification.

Definition at line 263 of file SelectableImpl.cc.

References candidateObj(), zypp::ResStatus::getTransactByValue(), installedObj(), zypp::ResStatus::SOLVER, status(), zypp::PoolItem_Ref::status(), and zypp::ResStatus::transacts().

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

Return value of LicenceConfirmed bit.

Definition at line 125 of file SelectableImpl.h.

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

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

Set LicenceConfirmed bit.

Definition at line 129 of file SelectableImpl.h.

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

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

Definition at line 133 of file SelectableImpl.h.

References availableBegin(), and availableEnd().

Referenced by candidateObj(), and setCandidate().

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

Definition at line 144 of file SelectableImpl.h.

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

Referenced by candidateObj().

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

Definition at line 165 of file SelectableImpl.h.

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

Referenced by status().


Friends And Related Function Documentation

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

Stream output.

Definition at line 186 of file SelectableImpl.h.


Member Data Documentation

ResObject::Kind zypp::ui::Selectable::Impl::_kind [private]

Definition at line 177 of file SelectableImpl.h.

Referenced by kind().

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

Definition at line 178 of file SelectableImpl.h.

Referenced by name().

PoolItem zypp::ui::Selectable::Impl::_installedItem [private]

Definition at line 179 of file SelectableImpl.h.

Referenced by installedObj(), and theObj().

AvialableItemSet zypp::ui::Selectable::Impl::_availableItems [private]

Definition at line 180 of file SelectableImpl.h.

Referenced by allCandidatesLocked(), availableBegin(), availableEnd(), availableObjs(), and defaultCandidate().

PoolItem zypp::ui::Selectable::Impl::_candidate [private]

Definition at line 181 of file SelectableImpl.h.

Referenced by candidateObj(), and setCandidate().


The documentation for this struct was generated from the following files:
Generated on Tue Sep 25 19:23:30 2007 for libzypp by  doxygen 1.5.3