action_r on each matching Capability in a ResPool.
More...
#include <CapMatchHelper.h>
Public Types | |
| typedef function < bool(const CapAndItem &)> | Action |
Public Member Functions | |
| ForEachMatchInPool (const ResPool &pool_r, const Dep &dep_r, const Action &action_r) | |
| bool | operator() (const Capability &cap_r) const |
Private Attributes | |
| ResPool | _pool |
| Dep | _dep |
| Action | _action |
action_r on each matching Capability in a ResPool.
Functor is provided to ease using forEachMatchIn as action in other algorithms.
bool consume( const CapAndItem & cai_r ); ResPool _pool; PoolItem _pi; // Invoke consume on all PoolItems obsoleted by pi. // short: forEachPoolItemMatchedBy( _pool, _pi, Dep::OBSOLETES, consume ); for_each( _pi->dep(Dep::OBSOLETES).begin(), _pi->dep(Dep::OBSOLETES).end(), ForEachMatchInPool( _pool, Dep::PROVIDES, consume ) ); // Invoke consume on all PoolItems obsoleting pi. // short: forEachPoolItemMatching( _pool, Dep::OBSOLETES, _pi, consume ); for_each( pi->dep(Dep::PROVIDES).begin(), pi->dep(Dep::PROVIDES).end(), ForEachMatchInPool( _pool, Dep::OBSOLETES, consume ) );
Definition at line 205 of file CapMatchHelper.h.
| typedef function<bool(const CapAndItem &)> zypp::ForEachMatchInPool::Action |
Definition at line 208 of file CapMatchHelper.h.
| zypp::ForEachMatchInPool::ForEachMatchInPool | ( | const ResPool & | pool_r, | |
| const Dep & | dep_r, | |||
| const Action & | action_r | |||
| ) | [inline] |
Definition at line 211 of file CapMatchHelper.h.
| bool zypp::ForEachMatchInPool::operator() | ( | const Capability & | cap_r | ) | const [inline] |
Definition at line 219 of file CapMatchHelper.h.
References _action, _dep, _pool, and zypp::forEachMatchIn().
ResPool zypp::ForEachMatchInPool::_pool [private] |
Dep zypp::ForEachMatchInPool::_dep [private] |
Action zypp::ForEachMatchInPool::_action [private] |
1.5.3