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 Attributes

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

Friends

std::ostream & operator<< (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 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  )  const
 

Definition at line 134 of file SelectableImpl.cc.

References candidateObj(), installedObj(), zypp::ResStatus::isByUser(), zypp::ui::S_AutoInstall, zypp::ui::S_AutoUpdate, zypp::ui::S_Install, 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 160 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, zypp::ui::S_Update, and zypp::ResStatus::USER.

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

Installed object.

Definition at line 78 of file SelectableImpl.h.

References _installedItem.

Referenced by modifiedBy(), and status().

PoolItem zypp::ui::Selectable::Impl::candidateObj  )  const [inline]
 

Best among available objects.

The _candiate if set, or the first available.

Note:
Transacted Objects prefered, Status calculation relies on it.

Definition at line 85 of file SelectableImpl.h.

References _candidate.

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

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

Referenced by Impl().

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

Best among all objects.

Definition at line 97 of file SelectableImpl.h.

References _installedItem, and candidateObj().

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

Definition at line 104 of file SelectableImpl.h.

References _availableItems.

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

Definition at line 108 of file SelectableImpl.h.

References _availableItems.

Referenced by setCandidate().

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

Definition at line 112 of file SelectableImpl.h.

References _availableItems.

Referenced by setCandidate().

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

Return who caused the modification.

Definition at line 253 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 119 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 123 of file SelectableImpl.h.

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


Friends And Related Function Documentation

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

Stream output

Definition at line 136 of file SelectableImpl.h.


Member Data Documentation

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

Definition at line 127 of file SelectableImpl.h.

Referenced by kind().

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

Definition at line 128 of file SelectableImpl.h.

Referenced by name().

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

Definition at line 129 of file SelectableImpl.h.

Referenced by installedObj(), and theObj().

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

Definition at line 130 of file SelectableImpl.h.

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

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

Definition at line 131 of file SelectableImpl.h.

Referenced by candidateObj(), and setCandidate().


The documentation for this struct was generated from the following files:
Generated on Thu Jul 6 00:07:35 2006 for zypp by  doxygen 1.4.6