bool ResPool::empty() const
{ return _pimpl->empty(); }
+ PoolItem ResPool::find( const sat::Solvable & slv_r ) const
+ { return _pimpl->find( slv_r ); }
+
ResPool::size_type ResPool::size() const
{ return _pimpl->size(); }
///////////////////////////////////////////////////////////////////
namespace zypp
{ /////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////
+ namespace sat
+ { /////////////////////////////////////////////////////////////////
+ class Solvable;
+ /////////////////////////////////////////////////////////////////
+ } // namespace sat
+ ///////////////////////////////////////////////////////////////////
class SerialNumber;
/** Wheter in sync with sat-pool. */
bool satSynced() const;
+
/** Sync with sat-pool. */
void satSync() const;
+ /** Return the corresponding \ref PoolItem.
+ * Pool and sat pool should be in sync. Returns an empty
+ * \ref PoolItem if there is no corresponding \ref PoolItem.
+ * \see \ref PoolItem::satSolvable.
+ */
+ PoolItem find( const sat::Solvable & slv_r ) const;
+
public:
/** */
bool empty() const;
//MIL << "Pool: " << _serial << ": In sync with sat-pool " << _satSyncRequired << endl;
}
+ ///////////////////////////////////////////////////////////////////
+ //
+ // METHOD NAME : PoolImpl::satSync
+ // METHOD TYPE : void
+ //
+ PoolItem PoolImpl::find( const sat::Solvable & slv_r ) const
+ {
+ if ( slv_r )
+ {
+ for_( it, begin(), end() )
+ {
+ if ( (*it).satSolvable() == slv_r )
+ return *it;
+ }
+ }
+ return PoolItem();
+ }
+
/******************************************************************
**
** FUNCTION NAME : operator<<
/** Sync with sat-pool. */
void satSync() const;
+ /** Return the corresponding \ref PoolItem.
+ * Pool and sat pool should be in sync. Returns an empty
+ * \ref PoolItem if there is no corresponding \ref PoolItem.
+ * \see \ref PoolItem::satSolvable.
+ */
+ PoolItem find( const sat::Solvable & slv_r ) const;
+
private:
/** Serial number. */
SerialNumber _serial;