Go to the documentation of this file.
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;
92 static Ptr get(
const std::string & name_r )
101 {
return resolvable_r ?
get( resolvable_r->satSolvable() ) :
Ptr(); }
120 const std::string &
name()
const;
371 {
return pickDelete( pi_r, causer_r,
false ); }
581 #endif // ZYPP_UI_SELECTABLE_H
bool locked() const
True if locked (subclass of unmodified).
installed_size_type installedSize() const
bool hasInstalledObj() const
True if installed object is present.
picklist_iterator picklistBegin() const
Combining sat::Solvable and ResStatus.
picklist_size_type picklistPos(const PoolItem &pi_r) const
Return the position of pi_r in the piclist or picklistNoPos.
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
intrusive_ptr< const TRes > constPtrType
Status status() const
Return the current Status.
std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
A Solvable object within the sat Pool.
ResKind kind() const
The ResObjects kind.
bool identicalAvailable(const PoolItem &rhs) const
True if rhs is installed and one with the same content is available.
SelectableTraits::available_iterator available_iterator
Iterates over ResObject::constPtr.
bool offSystem() const
True if would be off system after commit.
Solvable satSolvable() const
Return the corresponding sat::Solvable.
bool isBroken() const
Whether a relevant patchs requirements are broken.
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
bool isUnwanted() const
Broken (needed) but locked patches.
bool isRelevant() const
Returns true if the patch is relevant which means that at least one package of the patch is installed...
Collects PoolItems of same kind and name.
bool setDeleted(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets deleted if it is installed.
Selectable_Ptr operator()(const PoolItem &pi_r) const
static const ResKind package
friend std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
Base class for reference counted objects.
intrusive_ptr< Selectable > Ptr
Iterable< installed_iterator > installed() const
static Ptr get(const std::string &name_r)
Get the Package Selctable by name.
PoolItem identicalAvailableObj(const PoolItem &rhs) const
Return an available Object with the same content as rhs.
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Set a candidate (out of available objects).
bool multiversionInstall() const
Whether at least one of the available packages has multiversionInstall set.
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Try to set a new Status.
bool toModify() const
True if either to delete or to install.
Selectable_Ptr result_type
RW_pointer< Impl > _pimpl
Pointer to implementation.
static Ptr get(ResKind kind_r, const std::string &name_r)
Get the Selctable by kind and name.
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific available item for installation.
bool identIsAutoInstalled() const
Whether this ident is flagged as AutoInstalled.
bool identicalInstalledCandidate() const
True if the candidateObj is installed (same content).
bool setToInstall(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be installed (new- or re-install).
SelectableTraits::installed_iterator installed_iterator
installed_iterator installedEnd() const
static constexpr const picklist_size_type picklistNoPos
Returned by picklistPos if the Item does not belong to the picklist.
SelectableTraits::available_size_type available_size_type
bool availableEmpty() const
AvailableItemSet::iterator available_iterator
TraitsType::constPtrType constPtr
bool setFate(Fate fate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
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.
bool hasCandidateObj() const
True if candidate object is present.
bool toInstall() const
True if to install.
bool hasCandidateObjOnly() const
True if candidate object is present but no installed.
Access to the sat-pools string space.
bool pickNoDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific installed item from deletion.
shared_ptr< Impl > Impl_Ptr
PoolItem installedObj() const
The last Installed object.
AvailableItemSet::size_type installed_size_type
Selectable_Ptr operator()(const sat::Solvable &solv_r) const
bool setToDelete(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be deleted (must be installed).
bool setUpToDate(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets installed if it is not, or is older.
bool pickNoInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific available item from installation.
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
bool hasInstalledObjOnly() const
True if installed object is present but no candidate.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
bool identicalInstalledUpdateCandidate() const
True if the updateCandidateObj is installed (same content).
picklist_size_type picklistSize() const
DEFINE_PTR_TYPE(Selectable)
bool isUnmaintained() const
True if this package has no replacement from the available repositories.
intrusive_ptr< const Selectable > constPtr
Status pickStatus(const PoolItem &pi_r) const
Compute the ui::Status for an individual PoolItem.
bool isSatisfied() const
Whether a relevant patchs requirements are met.
static Ptr get(const ResObject::constPtr &resolvable_r)
Get the Selctable containing a specific ResObject.
PickList::size_type picklist_size_type
Easy-to use interface to the ZYPP dependency resolver.
PickList::const_iterator picklist_iterator
PoolItem candidateObj() const
The 'best' or 'most interesting' among all available objects.
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
bool installedEmpty() const
ResTraits< TRes >::constPtrType installedAsKind() const
Return the installedObj resolvable casted to a specific kind.
IdString ident() const
The identifier.
SelectableTraits::picklist_size_type picklist_size_type
picklist_iterator picklistEnd() const
bool setInstalled(ResStatus::TransactByValue causer_r=ResStatus::USER)
Take care the item gets installed if it is not.
PoolItem identicalInstalledObj(const PoolItem &rhs) const
\Return an installed Object with the same content as rhs.
static Ptr get(const sat::Solvable &solv_r)
Get the Selctable containing a specific sat::Solvable.
bool isNeeded() const
This includes unlocked broken patches, as well as those already selected to be installed.
bool hasRetractedInstalled() const
True if this Selectable contains an installed retracted item.
bool isUndetermined() const
Returns true for packages, because packages are not classified by the solver.
bool hasBothObjects() const
True if installed and candidate object is present.
Main filter selecting PoolItems by name and kind.
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Assign a new status to a specific item.
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
bool toDelete() const
True if to delete.
static Ptr get(const PoolItem &pi_r)
Get the Selctable containing a specific PoolItem.
available_iterator availableEnd() const
Status
UI status Status values calculated by Selectable.
Iterable< picklist_iterator > picklist() const
bool unmodified() const
True if neither to delete or to install.
bool hasRetracted() const
True if this Selectable contains a retracted item.
Solvable to Selectable transform functor.
available_size_type availableSize() const
friend std::ostream & operator<<(std::ostream &str, const Selectable &obj)
PoolItem theObj() const
An object you could use as pars pro toto.
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
const std::string & name() const
The ResObjects name.
SelectableTraits::installed_size_type installed_size_type
PoolItem candidateObjFrom(Repository repo_r) const
The best candidate provided by a specific Repository, if there is one.
available_iterator availableBegin() const
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific installed item for deletion.
AvailableItemSet::size_type available_size_type
AvailableItemSet::iterator installed_iterator
static Ptr get(IdString ident_r)
Get the Selctable by it's sat-identifyer.
SelectableTraits::picklist_iterator picklist_iterator
Selectable(Impl_Ptr pimpl_r)
Default ctor.
void setLicenceConfirmed(bool val_r=true)
Set LicenceConfirmed bit.
ResTraits< TRes >::constPtrType candidateAsKind() const
Return the candidateObj resolvable casted to a specific kind.
String related utilities and Regular expression matching.
bool onSystem() const
True if would be on system after commit.
bool unset(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to stay unmodified.
bool picklistEmpty() const
installed_iterator installedBegin() const
bool hasLocks() const
True if it includes locked items (don't mix this with the locked status).
std::ostream & operator<<(std::ostream &str, const Selectable &obj)
bool hasObject() const
True if either installed or candidate object is present.
Iterable< available_iterator > available() const