libzypp: Collection solvable filter functors.

libzypp 17.38.15

Collection solvable filter functors.
Filters and Functors

All functors should be able to process Solvable as well as PoolItem.

All functors should be able to process Solvable as well as PoolItem.

// The same filter...
filter::ByLocaleSupport f( Locale("de") );
// ...can be used to iterate the sat::Pool...
sat::Pool satpool( sat::Pool::instance() );
for_( it, satpool.filterBegin(f), satpool.filterEnd(f) )
{
MIL << *it << endl; // prints sat::Solvable
}
// ...as well as the ResPool.
ResPool pool ( ResPool::instance() );
for_( it, pool.filterBegin(f), pool.filterEnd(f) )
{
MIL << *it << endl; // prints PoolItem
}
for_
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
Definition Easy.h:27
MIL
#define MIL
Definition Logger.h:130
zypp::Locale::Locale
Locale()
Default Ctor: noCode.
Definition Locale.cc:180
zypp::ResPool::instance
static ResPool instance()
Singleton ctor.
Definition ResPool.cc:38
zypp::sat::Pool::instance
static Pool instance()
Singleton ctor.
Definition Pool.h:55