12#ifndef ZYPP_UI_SELECTABLE_H
13#define ZYPP_UI_SELECTABLE_H
93 static Ptr get(
const std::string &
name_r )
106 {
return get(
pi_r.satSolvable() ); }
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;
178 bool identicalInstalledCandidate()
const
179 {
return identicalInstalled( candidateObj() ); }
184 bool identicalInstalledUpdateCandidate()
const
185 {
return identicalInstalled( updateCandidateObj() ); }
191 PoolItem identicalAvailableObj(
const PoolItem & rhs )
const;
197 PoolItem identicalInstalledObj(
const PoolItem & rhs )
const;
206 typename ResTraits<TRes>::constPtrType installedAsKind()
const
207 {
return asKind<TRes>( candidateObj() ); }
216 typename ResTraits<TRes>::constPtrType candidateAsKind()
const
217 {
return asKind<TRes>( candidateObj() ); }
227 PoolItem setCandidate(
const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
229 PoolItem setCandidate(
const ResObject::constPtr& newCandidate_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
237 bool setOnSystem(
const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
244 PoolItem theObj()
const;
250 std::vector<std::string> supersededBy()
const;
258 bool availableEmpty()
const;
259 available_size_type availableSize()
const;
263 {
return makeIterable( availableBegin(), availableEnd() ); }
272 bool installedEmpty()
const;
273 installed_size_type installedSize()
const;
277 {
return makeIterable( installedBegin(), installedEnd() ); }
287 bool picklistEmpty()
const;
288 picklist_size_type picklistSize()
const;
292 {
return makeIterable( picklistBegin(), picklistEnd() ); }
314 bool hasObject()
const
315 {
return (! installedEmpty()) || candidateObj(); }
318 bool hasInstalledObj()
const
319 {
return ! installedEmpty(); }
322 bool hasCandidateObj()
const
323 {
return bool(candidateObj()); }
326 bool hasBothObjects()
const
327 {
return (! installedEmpty()) && candidateObj(); }
330 bool hasInstalledObjOnly()
const
331 {
return (! installedEmpty()) && ! candidateObj(); }
334 bool hasCandidateObjOnly()
const
335 {
return ( installedEmpty() ) && candidateObj(); }
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;
417 Status pickStatus(
const PoolItem & pi_r )
const;
420 bool setPickStatus(
const PoolItem & pi_r, Status state_r, ResStatus::TransactByValue causer_r = ResStatus::USER );
432 bool isUndetermined()
const;
437 bool isRelevant()
const;
440 bool isSatisfied()
const;
443 bool isBroken()
const;
450 bool isNeeded()
const;
453 bool isUnwanted()
const;
469 bool unmodified()
const
470 {
return fate() == UNMODIFIED; }
479 {
Status st( status() );
return(
st == S_Protected ||
st == S_Taboo ); }
486 bool hasLocks()
const;
489 bool toModify()
const
490 {
return fate() != UNMODIFIED; }
493 bool toDelete()
const
494 {
return fate() == TO_DELETE; }
497 bool toInstall()
const
498 {
return fate() == TO_INSTALL; }
501 bool onSystem()
const
502 {
return( ( hasInstalledObj() && !toDelete() )
503 ||( hasCandidateObj() && toInstall() ) ); }
506 bool offSystem()
const
507 {
return ! onSystem(); }
514 {
return setFate( TO_INSTALL,
causer_r ); }
524 {
return setFate( TO_DELETE,
causer_r ); }
531 {
return setFate( UNMODIFIED,
causer_r ); }
555 bool hasLicenceConfirmed()
const;
558 void setLicenceConfirmed(
bool val_r =
true );
593 {
return operator()(
pi_r.satSolvable() ); }
std::ostream & operator<<(std::ostream &str, const zypp::sat::detail::CDataiterator *obj)
RepoManager implementation.
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Access to the sat-pools string space.
Combining sat::Solvable and ResStatus.
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
SelectableTraits::installed_size_type installed_size_type
SelectableTraits::installed_iterator installed_iterator
SelectableTraits::picklist_size_type picklist_size_type
SelectableTraits::picklist_iterator picklist_iterator
intrusive_ptr< Selectable > Ptr
SelectableTraits::available_iterator available_iterator
Iterates over ResObject::constPtr.
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.
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
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
Solvable to Selectable transform functor.
Selectable_Ptr operator()(const PoolItem &pi_r) const
#define DEFINE_PTR_TYPE(NAME)
Forward declaration of Ptr types.