12 #ifndef ZYPP_UI_SELECTABLEIMPL_H
13 #define ZYPP_UI_SELECTABLEIMPL_H
59 template <
class _Iterator>
61 const std::string & name_r,
64 :
_ident( sat::Solvable::SplitIdent( kind_r, name_r ).
ident() )
68 for_( it, begin_r, end_r )
70 if ( it->status().isInstalled() )
87 const std::string &
name()
const
132 if ( (*it)->repository() == repo_r )
163 if ( defaultCand->arch() != installed->arch()
168 if ( defaultCand->edition() <= installed->edition() )
201 if ( identical( *it, rhs ) )
215 if ( identical( *it, rhs ) )
344 if ( (*it).status().transacts() )
354 if ( (*it).status().transacts() )
365 bool solver_allowVendorChange(
ResPool::instance().resolver().allowVendorChange() );
376 if ( ! solver_allowVendorChange )
380 else if ( ! sameArch )
402 if ( ! (*it).status().isLocked() )
413 if ( ! (*it).status().isLocked() )
436 return str <<
'[' << obj.
kind() <<
']' << obj.
name() <<
": " << obj.
status()
445 str <<
'[' << obj.
kind() <<
']' << obj.
name() <<
": " << obj.
status()
449 str <<
" (I 0) {}" << endl <<
" ";
461 str <<
" " << t <<
" " << *it << endl;
468 str <<
"(A 0) {}" << endl <<
" ";
480 t = *it == up ?
'C' :
'c';
482 else if ( *it == up )
486 str <<
" " << t <<
" " << *it << endl;
505 t = *it == up ?
'C' :
'c';
507 else if ( *it == up )
511 str <<
" " << t <<
" " << *it <<
"\t" << obj.
pickStatus( *it ) << endl;
524 #endif // ZYPP_UI_SELECTABLEIMPL_H
InstalledItemSet _installedItems
bool installedEmpty() const
ResStatus::TransactByValue modifiedBy() const
Return who caused the modification.
Status
UI status Status values calculated by Selectable.
AvailableItemSet _availableItems
picklist_size_type picklistSize() const
SelectableTraits::installed_size_type installed_size_type
const PickList & picklist() const
TraitsType::KindType Kind
scoped_ptr< PickList > _picklistPtr
lazy initialized picklist
PoolItem theObj() const
Best among all objects.
bool setStatus(Status state_r, ResStatus::TransactByValue causer_r)
PoolItem defaultCandidate() const
Status pickStatus(const PoolItem &pi_r) const
bool allCandidatesLocked() const
bool hasLicenceConfirmed() const
Return value of LicenceConfirmed bit.
SelectableTraits::available_iterator available_iterator
bool isMultiversion(IdString ident_r) const
bool multiversionInstall() const
Access to the sat-pools string space.
bool identicalAvailable(const PoolItem &rhs) const
True if rhs is installed and one with the same content is available.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
std::vector< PoolItem > PickList
PoolItem candidateObj() const
Best among available objects.
const Arch Arch_noarch(_noarch())
bool isUnmaintained() const
void setLicenceConfirmed(bool toVal_r=true)
ResObject::Kind kind() const
SelectableTraits::InstalledItemSet InstalledItemSet
std::set< PoolItem, AVOrder > AvailableItemSet
PoolItem setCandidate(const PoolItem &newCandidate_r, ResStatus::TransactByValue causer_r)
Set a userCandidate (out of available objects).
std::ostream & operator<<(std::ostream &str, const Selectable::Impl &obj)
PoolItem highestAvailableVersionObj() const
Simply the highest available version, ignoring priorities and policies.
bool equivalent(const Vendor &lVendor, const Vendor &rVendor) const
Return whether two vendor strings shold be treated as the same vendor.
SelectableTraits::PickList PickList
SelectableTraits::installed_iterator installed_iterator
bool isUndetermined() const
No validation is performed for packages.
static Pool instance()
Singleton ctor.
PoolItem identicalAvailableObj(const PoolItem &rhs) const
const
available_const_iterator availableEnd() const
const std::string & name() const
picklist_iterator picklistEnd() const
bool identicalInstalled(const PoolItem &rhs) const
True if rhs has the same content as an installed one.
const ResObject::Kind _kind
AvailableItemSet::const_iterator available_const_iterator
AvailableItemSet::const_iterator installed_const_iterator
SelectableTraits::available_const_iterator available_const_iterator
bool isUndetermined() const
ResStatus & status() const
Returns the current status.
bool isRelevant() const
Returns true if the solvable is relevant which means e.g.
installed_iterator installedBegin() const
SelectableTraits::AvailableItemSet AvailableItemSet
std::ostream & dumpOn(std::ostream &str, const Selectable::Impl &obj)
bool isLicenceConfirmed() const
PoolItem installedObj() const
Installed object (transacting ot highest version).
bool allInstalledLocked() const
bool isBroken() const
Whether a relevant items requirements are broken.
PoolItem _candidate
The object selected by setCandidateObj() method.
Selectable implementation.
installed_size_type installedSize() const
SelectableTraits::installed_const_iterator installed_const_iterator
Impl(const ResObject::Kind &kind_r, const std::string &name_r, _Iterator begin_r, _Iterator end_r)
PoolItem updateCandidateObj() const
The best candidate for update, if there is one.
AvailableItemSet::iterator installed_iterator
picklist_iterator picklistBegin() const
void setLicenceConfirmed(bool val_r)
Set LicenceConfirmed bit.
std::set< PoolItem, IOrder > InstalledItemSet
sat::Solvable satSolvable() const
Return the corresponding sat::Solvable.
AvailableItemSet::size_type installed_size_type
bool isSatisfied() const
Whether a relevant items requirements are met.
installed_iterator installedEnd() const
PoolItem candidateObjFrom(Repository repo_r) const
The best candidate provided by a specific Repository, if there is one.
PoolItem transactingInstalled() const
SelectableTraits::picklist_iterator picklist_iterator
Reference to a PoolItem connecting ResObject and ResStatus.
bool setPickStatus(const PoolItem &pi_r, Status state_r, ResStatus::TransactByValue causer_r)
SelectableTraits::available_size_type available_size_type
PoolItem identicalInstalledObj(const PoolItem &rhs) const
const
PoolItem transactingCandidate() const
static const VendorAttr & instance()
Singleton.
bool pickInstall(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
bool picklistEmpty() const
SelectableTraits::picklist_size_type picklist_size_type
available_size_type availableSize() const
bool pickDelete(const PoolItem &pi_r, ResStatus::TransactByValue causer_r, bool yesno_r)
AvailableItemSet::size_type available_size_type
AvailableItemSet::iterator available_iterator
available_const_iterator availableBegin() const
bool availableEmpty() const
static ResPool instance()
Singleton ctor.