libzypp 17.31.23
zypp::Repository::EraseFromPool Struct Reference

Functor removing Repository from its Pool. More...

#include <Repository.h>

Public Member Functions

void operator() (Repository repository_r) const
 

Detailed Description

Functor removing Repository from its 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;
{
*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;
Reference counted access to a Tp object calling a custom Dispose function when the last AutoDispose h...
Definition: AutoDispose.h:94
void addSolv(const Pathname &file_r)
Load Solvables from a solv-file.
Definition: Repository.cc:320
Global sat-pool.
Definition: Pool.h:47
Repository reposInsert(const std::string &alias_r)
Return a Repository named alias_r.
Definition: Pool.cc:143
Functor removing Repository from its Pool.
Definition: Repository.h:439
#define DBG
Definition: Logger.h:95
#define MIL
Definition: Logger.h:96
1 sat::pool(){0repos|2solv}
2 sat::pool(){1repos|2612solv}
3 sat::pool(){0repos|2solv}
RepoInfoList repos
Definition: RepoManager.cc:285

Leaving the block without calling tmprepo.resetDispose(); before, will automatically remove the Repo from its Pool.

Definition at line 438 of file Repository.h.

Member Function Documentation

◆ operator()()

void zypp::Repository::EraseFromPool::operator() ( Repository  repository_r) const
inline

Definition at line 440 of file Repository.h.


The documentation for this struct was generated from the following file: