12#ifndef ZYPP_UI_SELECTABLE_H
13#define ZYPP_UI_SELECTABLE_H
93 static Ptr get(
const std::string & name_r )
102 {
return resolvable_r ?
get( resolvable_r->satSolvable() ) :
Ptr(); }
121 const std::string & name()
const;
150 PoolItem updateCandidateObj()
const;
158 PoolItem highestAvailableVersionObj()
const;
161 bool identIsAutoInstalled()
const;
167 bool identicalAvailable(
const PoolItem & rhs )
const;
173 bool identicalInstalled(
const PoolItem & rhs )
const;
250 std::vector<std::string> supersededBy()
const;
258 bool availableEmpty()
const;
259 available_size_type availableSize()
const;
272 bool installedEmpty()
const;
273 installed_size_type installedSize()
const;
287 bool picklistEmpty()
const;
288 picklist_size_type picklistSize()
const;
339 bool hasBlacklisted()
const;
342 bool hasBlacklistedInstalled()
const;
345 bool hasRetracted()
const;
348 bool hasRetractedInstalled()
const;
354 bool hasPtfInstalled()
const;
361 bool isUnmaintained()
const;
374 bool multiversionInstall()
const;
392 {
return pickDelete( pi_r, causer_r,
false ); }
432 bool isUndetermined()
const;
437 bool isRelevant()
const;
440 bool isSatisfied()
const;
443 bool isBroken()
const;
450 bool isNeeded()
const;
453 bool isUnwanted()
const;
486 bool hasLocks()
const;
555 bool hasLicenceConfirmed()
const;
558 void setLicenceConfirmed(
bool val_r =
true );
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
Access to the sat-pools string space.
Iterable< TIterator > makeIterable(TIterator &&begin_r, TIterator &&end_r)
convenient construction.
Combining sat::Solvable and ResStatus.
static const ResKind package
TraitsType::constPtrType constPtr
Base class for reference counted objects.
Main filter selecting PoolItems by name and kind.
A Solvable object within the sat Pool.
Collects PoolItems of same kind and name.
SelectableTraits::available_size_type available_size_type
available_iterator availableEnd() const
bool onSystem() const
True if would be on system after commit.
SelectableTraits::installed_size_type installed_size_type
bool pickNoInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific available item from installation.
SelectableTraits::installed_iterator installed_iterator
ResTraits< TRes >::constPtrType installedAsKind() const
Return the installedObj resolvable casted to a specific kind.
bool offSystem() const
True if would be off system after commit.
bool toModify() const
True if either to delete or to install.
picklist_iterator picklistBegin() const
bool hasCandidateObj() const
True if candidate object is present.
Iterable< picklist_iterator > picklist() const
ResTraits< TRes >::constPtrType candidateAsKind() const
Return the candidateObj resolvable casted to a specific kind.
bool toDelete() const
True if to delete.
bool hasCandidateObjOnly() const
True if candidate object is present but no installed.
static Ptr get(const pool::ByIdent &ident_r)
Get the Selctable.
installed_iterator installedBegin() const
bool locked() const
True if locked (subclass of unmodified).
static constexpr const picklist_size_type picklistNoPos
Returned by picklistPos if the Item does not belong to the picklist.
bool setToDelete(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be deleted (must be installed).
friend std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
intrusive_ptr< const Selectable > constPtr
SelectableTraits::picklist_size_type picklist_size_type
bool pickNoDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
Deselect a specific installed item from deletion.
bool hasBothObjects() const
True if installed and candidate object is present.
picklist_iterator picklistEnd() const
Iterable< available_iterator > available() const
Selectable(Impl_Ptr pimpl_r)
Default ctor.
RW_pointer< Impl > _pimpl
Pointer to implementation.
installed_iterator installedEnd() const
bool unset(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to stay unmodified.
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
bool identicalInstalledUpdateCandidate() const
True if the updateCandidateObj is installed (same content).
bool unmodified() const
True if neither to delete or to install.
Iterable< installed_iterator > installed() const
shared_ptr< Impl > Impl_Ptr
available_iterator availableBegin() const
bool identicalInstalledCandidate() const
True if the candidateObj is installed (same content).
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific available item for installation.
bool hasObject() const
True if either installed or candidate object is present.
PoolItem candidateObj() const
The 'best' or 'most interesting' among all available objects.
bool toInstall() const
True if to install.
bool hasInstalledObj() const
True if installed object is present.
SelectableTraits::picklist_iterator picklist_iterator
Status status() const
Return the current Status.
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
bool hasInstalledObjOnly() const
True if installed object is present but no candidate.
intrusive_ptr< Selectable > Ptr
bool setToInstall(ResStatus::TransactByValue causer_r=ResStatus::USER)
Set the item to be installed (new- or re-install).
bool setFate(Fate fate_r, ResStatus::TransactByValue causer_r=ResStatus::USER)
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r=ResStatus::USER, bool yesno_r=true)
Select a specific installed item for deletion.
SelectableTraits::available_iterator available_iterator
Iterates over ResObject::constPtr.
bool installedEmpty() const
picklist_size_type picklistPos(const PoolItem &pi_r) const
Return the position of pi_r in the piclist or picklistNoPos.
String related utilities and Regular expression matching.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Status
UI status Status values calculated by Selectable.
std::ostream & operator<<(std::ostream &str, const Selectable &obj)
std::ostream & dumpOn(std::ostream &str, const Selectable &obj)
Easy-to use interface to the ZYPP dependency resolver.
const ResKind ResTraits< Package >::kind(ResKind::package)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
ResTraits< TRes >::PtrType asKind(const sat::Solvable &solvable_r)
Directly create a certain kind of ResObject from sat::Solvable.
Wrapper for const correct access via Smart pointer types.
intrusive_ptr< const TRes > constPtrType
Solvable satSolvable() const
Return the corresponding sat::Solvable.
AvailableItemSet::size_type available_size_type
AvailableItemSet::iterator available_iterator
PickList::const_iterator picklist_iterator
PickList::size_type picklist_size_type
AvailableItemSet::iterator installed_iterator
AvailableItemSet::size_type installed_size_type
Selectable implementation.
Solvable to Selectable transform functor.
Selectable_Ptr operator()(const sat::Solvable &solv_r) const
Selectable_Ptr operator()(const PoolItem &pi_r) const
Selectable_Ptr result_type
#define DEFINE_PTR_TYPE(NAME)
Forward declaration of Ptr types.