#include <CapMatchHelper.h>
Public Types | |
| typedef function < bool(const PoolItem &)> | Action |
Public Member Functions | |
| OncePerPoolItem (const PoolItem &self_r=PoolItem()) | |
| OncePerPoolItem (const Action &action_r, const PoolItem &self_r=PoolItem()) | |
| bool | operator() (const CapAndItem &cai_r) const |
| const std::set < PoolItem > & | collectedItems () const |
Private Attributes | |
| Action | _action |
| PoolItem | _self |
| shared_ptr< std::set < PoolItem > > | _uset |
Additionally you may omit invocation of action_r for a specific PoolItem.
Even if no _action is given, the PoolItems that would have been processed are collected in a std::set, available via collectedItems.
bool consume( const CapAndItem & cai_r ); bool consumePi( const PoolItem & pi_r ); ResPool _pool; PoolItem _pi; // Invoke consume on all PoolItems obsoleted by pi. // Once for each matching Capability, thus the same PoolItem // might be involved mutiple times. forEachPoolItemMatchedBy( _pool, _pi, Dep::OBSOLETES, consume ); // Invoke consume on all PoolItems obsoleted by pi. // Once for each PoolItem, still including _pi in case // it provides a match by itself. forEachPoolItemMatchedBy( _pool, _pi, Dep::OBSOLETES, OncePerPoolItem( consumePi ) ); // Invoke consume on all PoolItems obsoleted by pi. // Once for each PoolItem, omitting invokation for // _pi (in case it obsoletes itself). forEachPoolItemMatchedBy( _pool, _pi, Dep::OBSOLETES, OncePerPoolItem( consumePi, _pi ) );
Definition at line 332 of file CapMatchHelper.h.
| typedef function<bool(const PoolItem &)> zypp::OncePerPoolItem::Action |
Definition at line 335 of file CapMatchHelper.h.
Definition at line 339 of file CapMatchHelper.h.
| zypp::OncePerPoolItem::OncePerPoolItem | ( | const Action & | action_r, | |
| const PoolItem & | self_r = PoolItem() | |||
| ) | [inline] |
Definition at line 344 of file CapMatchHelper.h.
| bool zypp::OncePerPoolItem::operator() | ( | const CapAndItem & | cai_r | ) | const [inline] |
Definition at line 351 of file CapMatchHelper.h.
References _action, _self, _uset, and zypp::CapAndItem::item.
| const std::set<PoolItem>& zypp::OncePerPoolItem::collectedItems | ( | ) | const [inline] |
Action zypp::OncePerPoolItem::_action [private] |
PoolItem zypp::OncePerPoolItem::_self [private] |
shared_ptr<std::set<PoolItem> > zypp::OncePerPoolItem::_uset [private] |
1.5.3