IdString ident() const;
/** The ResObjects kind. */
- ResObject::Kind kind() const;
+ ResKind kind() const;
/** The ResObjects name. */
const std::string & name() const;
* Package::constPtr p( mySelectable.installedAsKind<Package>() );
* \endcode
*/
- template<class _Res>
- typename ResTraits<_Res>::constPtrType installedAsKind() const
- { return asKind<_Res>( candidateObj() ); }
+ template<class TRes>
+ typename ResTraits<TRes>::constPtrType installedAsKind() const
+ { return asKind<TRes>( candidateObj() ); }
/** Return the \ref candidateObj resolvable casted to a specific kind.
* \code
* Package::constPtr p( mySelectable.candidateAsKind<Package>() );
* \endcode
*/
- template<class _Res>
- typename ResTraits<_Res>::constPtrType candidateAsKind() const
- { return asKind<_Res>( candidateObj() ); }
+ template<class TRes>
+ typename ResTraits<TRes>::constPtrType candidateAsKind() const
+ { return asKind<TRes>( candidateObj() ); }
/** Set a candidate (out of available objects).
* \return The new candidate, or NULL if choice was invalid
available_size_type availableSize() const;
available_iterator availableBegin() const;
available_iterator availableEnd() const;
+ inline Iterable<available_iterator> available() const
+ { return makeIterable( availableBegin(), availableEnd() ); }
//@}
////////////////////////////////////////////////////////////////////////
installed_size_type installedSize() const;
installed_iterator installedBegin() const;
installed_iterator installedEnd() const;
- //}
+ inline Iterable<installed_iterator> installed() const
+ { return makeIterable( installedBegin(), installedEnd() ); }
+ //@}
////////////////////////////////////////////////////////////////////////
picklist_size_type picklistSize() const;
picklist_iterator picklistBegin() const;
picklist_iterator picklistEnd() const;
- //}
+ inline Iterable<picklist_iterator> picklist() const
+ { return makeIterable( picklistBegin(), picklistEnd() ); }
+ //@}
////////////////////////////////////////////////////////////////////////
* install will deselect any other.
*/
//@{
- /** Whether different versions of this package can be installed at the same time.
- * Per default \c false. \see also \ref ZConfig::multiversion.
+ /** Whether at least one of the available packages has multiversionInstall set.
+ * \see \ref Solvable::multiversionInstall
+ * \see also \ref ZConfig::multiversion.
*/
bool multiversionInstall() const;
bool unmodified() const
{ return fate() == UNMODIFIED; }
- /** True if locked (subclass of unmodified).
- * The \ref locked status indicates that \b all installed and/or \b all available
- * items are locked. So you can't remove and/or can't install any item. This
- * is the common case.
- * \see \ref hasLocks
- */
+ /** True if locked (subclass of unmodified). */
bool locked() const
{ Status st( status() ); return( st == S_Protected || st == S_Taboo ); }
- /** True if it includes locked items (don't mix this with the \ref locked status).
- * This is also \c true for partially locked items, where only specific versions
- * are locked.
- * \see \ref locked
- */
- bool hasLocks() const;
-
/** True if either to delete or to install */
bool toModify() const
{ return fate() != UNMODIFIED; }