PoolItem Selectable::candidateObj() const
{ return _pimpl->candidateObj(); }
+ PoolItem Selectable::candidateObjFrom( Repository repo_r ) const
+ { return _pimpl->candidateObjFrom( repo_r ); }
+
PoolItem Selectable::updateCandidateObj() const
{ return _pimpl->updateCandidateObj(); }
*/
PoolItem candidateObj() const;
+ /** The best candidate provided by a specific \ref Repository, if there is one.
+ * In contrary to \ref candidateObj, this may return no item even if
+ * there are available objects. This simply means the \ref Repository
+ * does not provide this object.
+ */
+ PoolItem candidateObjFrom( Repository repo_r ) const;
+
/** The best candidate for update, if there is one.
* In contrary to \ref candidateObj, this may return no item even if
* there are available objects. This simply means the best object is
*/
PoolItem updateCandidateObj() const;
+
/** Return the \ref installedObj resolvable casted to a specific kind.
* \code
* Selectable mySelectable;
*/
PoolItem setCandidate( const PoolItem & newCandidate_r, ResStatus::TransactByValue causer_r );
+ /** The best candidate provided by a specific \ref Repository, if there is one.
+ * In contrary to \ref candidateObj, this may return no item even if
+ * there are available objects. This simply means the \ref Repository
+ * does not provide this object.
+ */
+ PoolItem candidateObjFrom( Repository repo_r ) const
+ {
+ for_( it, availableBegin(), availableEnd() )
+ {
+ if ( (*it)->repository() == repo_r )
+ return *it;
+ }
+ return PoolItem();
+ }
+
/** The best candidate for update, if there is one.
* In contrary to \ref candidateObj, this may return no item even if
* there are available objects. This simply means the best object is