#include <Selectable.h>
Query objects fate in case of commit. | |
| enum | Fate { TO_DELETE = -1, UNMODIFIED = 0, TO_INSTALL = 1 } |
| Fate | fate () const |
| bool | unmodified () const |
| True if either to delete or to install. | |
| bool | toModify () const |
| True if either to delete or to install. | |
| bool | toDelete () const |
| True if to delete. | |
| bool | toInstall () const |
| True if to install. | |
Public Types | |
| typedef intrusive_ptr < Selectable > | Ptr |
| typedef intrusive_ptr< const Selectable > | constPtr |
| typedef SelectableTraits::available_iterator | available_iterator |
| Iterates over ResObject::constPtr. | |
| typedef SelectableTraits::availableItem_iterator | availablePoolItem_iterator |
| typedef SelectableTraits::availableItem_size_type | size_type |
| typedef shared_ptr < Impl > | Impl_Ptr |
Public Member Functions | |
| ResObject::Kind | kind () const |
| The ResObjects kind. | |
| const std::string & | name () const |
| The ResObjects name. | |
| ResObject::constPtr | installedObj () const |
| Installed object. | |
| PoolItem | installedPoolItem () const |
| PoolItem corresponding to the installed object. | |
| ResObject::constPtr | candidateObj () const |
| Best among available objects. | |
| PoolItem | candidatePoolItem () const |
| PoolItem corresponding to the candidate object. | |
| ResObject::constPtr | setCandidate (ResObject::constPtr byUser_r) |
| Set a candidate (out of available objects). | |
| ResObject::constPtr | theObj () const |
| Best among all objects. | |
| size_type | availableObjs () const |
| Number of available objects. | |
| available_iterator | availableBegin () const |
| available_iterator | availableEnd () const |
| availablePoolItem_iterator | availablePoolItemBegin () const |
| availablePoolItem_iterator | availablePoolItemEnd () const |
| Selectable (Impl_Ptr pimpl_r) | |
| Default ctor. | |
Query for objects within this Selectable. | |
| bool | hasObject () const |
| True if either installed or candidate object is present. | |
| bool | hasInstalledObj () const |
| True if installed object is present. | |
| bool | hasCandidateObj () const |
| True if candidate object is present. | |
| bool | hasBothObjects () const |
| True if installed and candidate object is present. | |
| bool | hasInstalledObjOnly () const |
| True if installed object is present but no candidate. | |
| bool | hasCandidateObjOnly () const |
| True if candidate object is present but no installed. | |
Special inteface for Y2UI. | |
| |
| Status | status () const |
| Return the current Status. | |
| bool | set_status (const Status state_r) |
| Try to set a new Status. | |
| ResStatus::TransactByValue | modifiedBy () const |
| Return who caused the modification. | |
| bool | hasLicenceConfirmed () const |
| Return value of LicenceConfirmed bit. | |
| void | setLicenceConfirmed (bool val_r=true) |
| Set LicenceConfirmed bit. | |
Private Member Functions | |
| ~Selectable () | |
| Dtor. | |
Private Attributes | |
| RW_pointer< Impl > | _pimpl |
| Pointer to implementation. | |
Friends | |
| std::ostream & | operator<< (std::ostream &str, const Selectable &obj) |
| Stream output. | |
Classes | |
| struct | Impl |
| Selectable implementation. More... | |
Selectable is a status wrapper. That's why it offers the PoolItems ResObjects but hides their individual ResStatus. The ui::Status is calculated from (and transated to) PoolItems individual ResStatus values.
Definition at line 48 of file Selectable.h.
| typedef intrusive_ptr<Selectable> zypp::ui::Selectable::Ptr |
Definition at line 53 of file Selectable.h.
| typedef intrusive_ptr<const Selectable> zypp::ui::Selectable::constPtr |
Definition at line 54 of file Selectable.h.
Definition at line 58 of file Selectable.h.
Definition at line 59 of file Selectable.h.
| typedef shared_ptr<Impl> zypp::ui::Selectable::Impl_Ptr |
Definition at line 192 of file Selectable.h.
| zypp::ui::Selectable::Selectable | ( | Impl_Ptr | pimpl_r | ) |
| zypp::ui::Selectable::~Selectable | ( | ) | [private] |
| ResObject::Kind zypp::ui::Selectable::kind | ( | ) | const |
| const std::string & zypp::ui::Selectable::name | ( | ) | const |
| ResObject::constPtr zypp::ui::Selectable::installedObj | ( | ) | const |
Installed object.
Definition at line 61 of file Selectable.cc.
References _pimpl.
Referenced by hasBothObjects(), hasCandidateObjOnly(), hasInstalledObj(), hasInstalledObjOnly(), and hasObject().
| PoolItem zypp::ui::Selectable::installedPoolItem | ( | ) | const |
PoolItem corresponding to the installed object.
Definition at line 64 of file Selectable.cc.
References _pimpl.
| ResObject::constPtr zypp::ui::Selectable::candidateObj | ( | ) | const |
Best among available objects.
+ The user selected candiate, or a default.
Definition at line 67 of file Selectable.cc.
References _pimpl.
Referenced by hasBothObjects(), hasCandidateObj(), hasCandidateObjOnly(), hasInstalledObjOnly(), and hasObject().
| PoolItem zypp::ui::Selectable::candidatePoolItem | ( | ) | const |
PoolItem corresponding to the candidate object.
Definition at line 70 of file Selectable.cc.
References _pimpl.
| ResObject::constPtr zypp::ui::Selectable::setCandidate | ( | ResObject::constPtr | byUser_r | ) |
Set a candidate (out of available objects).
Definition at line 73 of file Selectable.cc.
References _pimpl.
| ResObject::constPtr zypp::ui::Selectable::theObj | ( | ) | const |
| Selectable::size_type zypp::ui::Selectable::availableObjs | ( | ) | const |
| Selectable::available_iterator zypp::ui::Selectable::availableBegin | ( | ) | const |
| Selectable::available_iterator zypp::ui::Selectable::availableEnd | ( | ) | const |
| Selectable::availablePoolItem_iterator zypp::ui::Selectable::availablePoolItemBegin | ( | ) | const |
| Selectable::availablePoolItem_iterator zypp::ui::Selectable::availablePoolItemEnd | ( | ) | const |
| bool zypp::ui::Selectable::hasObject | ( | ) | const [inline] |
True if either installed or candidate object is present.
Definition at line 112 of file Selectable.h.
References candidateObj(), and installedObj().
| bool zypp::ui::Selectable::hasInstalledObj | ( | ) | const [inline] |
True if installed object is present.
Definition at line 116 of file Selectable.h.
References installedObj().
| bool zypp::ui::Selectable::hasCandidateObj | ( | ) | const [inline] |
True if candidate object is present.
Definition at line 120 of file Selectable.h.
References candidateObj().
| bool zypp::ui::Selectable::hasBothObjects | ( | ) | const [inline] |
True if installed and candidate object is present.
Definition at line 124 of file Selectable.h.
References candidateObj(), and installedObj().
| bool zypp::ui::Selectable::hasInstalledObjOnly | ( | ) | const [inline] |
True if installed object is present but no candidate.
Definition at line 128 of file Selectable.h.
References candidateObj(), and installedObj().
| bool zypp::ui::Selectable::hasCandidateObjOnly | ( | ) | const [inline] |
True if candidate object is present but no installed.
Definition at line 132 of file Selectable.h.
References candidateObj(), and installedObj().
| Selectable::Fate zypp::ui::Selectable::fate | ( | ) | const |
Definition at line 106 of file Selectable.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, status(), TO_DELETE, TO_INSTALL, and UNMODIFIED.
Referenced by toDelete(), toInstall(), toModify(), and unmodified().
| bool zypp::ui::Selectable::unmodified | ( | ) | const [inline] |
True if either to delete or to install.
Definition at line 149 of file Selectable.h.
References fate(), and UNMODIFIED.
| bool zypp::ui::Selectable::toModify | ( | ) | const [inline] |
True if either to delete or to install.
Definition at line 153 of file Selectable.h.
References fate(), and UNMODIFIED.
| bool zypp::ui::Selectable::toDelete | ( | ) | const [inline] |
| bool zypp::ui::Selectable::toInstall | ( | ) | const [inline] |
| Status zypp::ui::Selectable::status | ( | void | ) | const |
Return the current Status.
Definition at line 55 of file Selectable.cc.
References _pimpl.
Referenced by fate().
| bool zypp::ui::Selectable::set_status | ( | const Status | state_r | ) |
Try to set a new Status.
Returns false if the transitions is not allowed.
Definition at line 58 of file Selectable.cc.
References _pimpl.
| ResStatus::TransactByValue zypp::ui::Selectable::modifiedBy | ( | ) | const |
| bool zypp::ui::Selectable::hasLicenceConfirmed | ( | ) | const |
Return value of LicenceConfirmed bit.
Definition at line 99 of file Selectable.cc.
References _pimpl.
| void zypp::ui::Selectable::setLicenceConfirmed | ( | bool | val_r = true |
) |
| std::ostream & operator<< | ( | std::ostream & | str, | |
| const Selectable & | obj | |||
| ) | [friend] |
RW_pointer<Impl> zypp::ui::Selectable::_pimpl [private] |
Pointer to implementation.
Definition at line 201 of file Selectable.h.
Referenced by availableBegin(), availableEnd(), availableObjs(), availablePoolItemBegin(), availablePoolItemEnd(), candidateObj(), candidatePoolItem(), hasLicenceConfirmed(), installedObj(), installedPoolItem(), kind(), modifiedBy(), name(), zypp::ui::operator<<(), set_status(), setCandidate(), setLicenceConfirmed(), status(), and theObj().
1.5.3