libzypp
10.5.0
|
Functor removing Repository from it's Pool. More...
#include <Repository.h>
Public Member Functions | |
void | operator() (Repository repository_r) const |
Functor removing Repository from it's Pool.
E.g. used as dispose function in. AutoDispose to provide a convenient and exception safe temporary Repository.
sat::Pool satpool; MIL << "1 " << satpool << endl; { AutoDispose<Repository> tmprepo( (Repository::EraseFromPool()) ); *tmprepo = satpool.reposInsert( "A" ); tmprepo->addSolv( "sl10.1-beta7-packages.solv" ); DBG << "2 " << satpool << endl; // Calling 'tmprepo.resetDispose();' here // would keep the Repo. } MIL << "3 " << satpool << endl;
1 sat::pool(){0repos|2slov} 2 sat::pool(){1repos|2612slov} 3 sat::pool(){0repos|2slov}
Leaving the block without calling tmprepo.resetDispose();
before, will automatically remove the Repo from it's Pool.
Definition at line 384 of file Repository.h.
void zypp::Repository::EraseFromPool::operator() | ( | Repository | repository_r | ) | const [inline] |
Definition at line 386 of file Repository.h.