libzypp: Collection solvable filter functors.

libzypp 17.25.10

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:28
MIL
#define MIL
Definition: Logger.h:91
zypp::Locale
'Language[_Country]' codes.
Definition: Locale.h:50
zypp::ResPool
Global ResObject pool.
Definition: ResPool.h:61
zypp::ResPool::instance
static ResPool instance()
Singleton ctor.
Definition: ResPool.cc:37
zypp::filter::ByLocaleSupport
Filter solvables according to their locale support.
Definition: Filter.h:63
zypp::sat::Pool
Global sat-pool.
Definition: Pool.h:47
zypp::sat::Pool::instance
static Pool instance()
Singleton ctor.
Definition: Pool.h:55