12 #ifndef ZYPP_UI_SELECTABLE_H
13 #define ZYPP_UI_SELECTABLE_H
57 typedef intrusive_ptr<Selectable>
Ptr;
58 typedef intrusive_ptr<const Selectable>
constPtr;
88 static Ptr get(
ResKind kind_r,
const std::string & name_r )
92 static Ptr get(
const std::string & name_r )
101 {
return resolvable_r ?
get( resolvable_r->satSolvable() ) :
Ptr(); }
105 {
return get( pi_r.satSolvable() ); }
120 const std::string &
name()
const;
338 {
return pickDelete( pi_r, causer_r,
false ); }
536 #endif // ZYPP_UI_SELECTABLE_H
Selectable_Ptr operator()(const PoolItem &pi_r) const
available_iterator availableEnd() const
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
PickList::const_iterator picklist_iterator
A Solvable object within the sat Pool.
IdString ident() const
The identifier.
installed_iterator installedEnd() const
Status
UI status Status values calculated by Selectable.
bool isSatisfied() const
Whether a relevant patchs requirements are met.
picklist_iterator picklistBegin() const
bool identicalAvailable(const PoolItem &rhs) const
True if rhs is installed and one with the same content is available.
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
static const ResKind package
Collects PoolItems of same kind and name.
bool isUnwanted() const
Broken (needed) but locked patches.
PoolItem installedObj() const
The last Installed object.
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Set a candidate (out of available objects).
intrusive_ptr< Selectable > Ptr
SelectableTraits::installed_iterator installed_iterator
bool hasInstalledObjOnly() const
True if installed object is present but no candidate.
ResObject::Kind kind() const
The ResObjects kind.
bool hasObject() const
True if either installed or candidate object is present.
Status status() const
Return the current Status.
PoolItem identicalAvailableObj(const PoolItem &rhs) const
Return an available Object with the same content as rhs.
Access to the sat-pools string space.
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
bool setToInstall(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be installed (new- or re-install).
bool onSystem() const
True if would be on system after commit.
bool hasInstalledObj() const
True if installed object is present.
TraitsType::constPtrType constPtr
bool unmodified() const
True if neither to delete or to install.
Selectable_Ptr operator()(const sat::Solvable &solv_r) const
PoolItem theObj() const
An object you could use as pars pro toto.
available_size_type availableSize() const
bool pickNoInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific available item from installation.
PoolItem identicalInstalledObj(const PoolItem &rhs) const
an installed Object with the same content as rhs.
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Try to set a new Status.
bool isUnmaintained() const
True if this package has no replacement from the available repositories.
bool hasBothObjects() const
True if installed and candidate object is present.
bool isBroken() const
Whether a relevant patchs requirements are broken.
void setLicenceConfirmed(bool val_r=true)
Set LicenceConfirmed bit.
bool setOnSystem(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Arrange the specified candidate (out of available objects) to be on system after commit.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
bool setInstalled(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets installed if it is not.
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
bool locked() const
True if locked (subclass of unmodified).
bool toModify() const
True if either to delete or to install.
ResTraits< _Res >::constPtrType candidateAsKind() const
Return the candidateObj resolvable casted to a specific kind.
ResTraits< _Res >::constPtrType installedAsKind() const
Return the installedObj resolvable casted to a specific kind.
bool isUndetermined() const
Returns true for packages, because packages are not classified by the solver.
bool toInstall() const
True if to install.
bool picklistEmpty() const
available_iterator availableBegin() const
bool isNeeded() const
This includes unlocked broken patches, as well as those already selected to be installed.
PoolItem candidateObjFrom(Repository repo_r) const
The best candidate provided by a specific Repository, if there is one.
bool setToDelete(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be deleted (must be installed).
std::ostream & operator<<(std::ostream &str, const Selectable &obj)
std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
installed_size_type installedSize() const
bool isRelevant() const
Returns true if the patch is relevant which means that at least one package of the patch is installed...
Status pickStatus(const PoolItem &pi_r) const
Compute the ui::Status for an individual PoolItem.
friend std::ostream & operator<<(std::ostream &str, const Selectable &obj)
bool setDeleted(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets deleted if it is installed.
bool multiversionInstall() const
Whether different versions of this package can be installed at the same time.
shared_ptr< Impl > Impl_Ptr
bool availableEmpty() const
Base class for reference counted objects.
SelectableTraits::available_iterator available_iterator
Iterates over ResObject::constPtr.
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Assign a new status to a specific item.
bool installedEmpty() const
intrusive_ptr< const Selectable > constPtr
PoolItem candidateObj() const
The 'best' or 'most interesting' among all available objects.
picklist_size_type picklistSize() const
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
bool hasCandidateObjOnly() const
True if candidate object is present but no installed.
Selectable implementation.
PickList::size_type picklist_size_type
bool offSystem() const
True if would be off system after commit.
bool unset(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to stay unmodified.
bool identicalInstalledUpdateCandidate() const
True if the updateCandidateObj is installed (same content).
DEFINE_PTR_TYPE(Selectable)
AvailableItemSet::iterator installed_iterator
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific available item for installation.
Selectable(Impl_Ptr pimpl_r)
Default ctor.
Wrapper for const correct access via Smart pointer types.
sat::Solvable satSolvable() const
Return the corresponding sat::Solvable.
bool toDelete() const
True if to delete.
bool setUpToDate(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets installed if it is not, or is older.
AvailableItemSet::size_type installed_size_type
SelectableTraits::picklist_iterator picklist_iterator
Selectable_Ptr result_type
Reference to a PoolItem connecting ResObject and ResStatus.
bool setFate(Fate fate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
bool hasCandidateObj() const
True if candidate object is present.
picklist_iterator picklistEnd() const
const std::string & name() const
The ResObjects name.
bool identicalInstalledCandidate() const
True if the candidateObj is installed (same content).
SelectableTraits::picklist_size_type picklist_size_type
friend std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
bool pickNoDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific installed item from deletion.
Solvable to Selectable transform functor.
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific installed item for deletion.
SelectableTraits::installed_size_type installed_size_type
Main filter selecting PoolItems by name and kind.
RW_pointer< Impl > _pimpl
Pointer to implementation.
AvailableItemSet::size_type available_size_type
AvailableItemSet::iterator available_iterator
SelectableTraits::available_size_type available_size_type
installed_iterator installedBegin() const
intrusive_ptr< const _Res > constPtrType