libzypp 17.37.17
zypp::Repository::EraseFromPool Struct Reference

Functor removing Repository from its Pool. More...

#include <zypp/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:95
void addSolv(const Pathname &file_r)
Load Solvables from a solv-file.
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:444
#define DBG
Definition Logger.h:99
#define MIL
Definition Logger.h:100
1 sat::pool(){0repos|2solv}
2 sat::pool(){1repos|2612solv}
3 sat::pool(){0repos|2solv}

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

Definition at line 443 of file Repository.h.

Member Function Documentation

◆ operator()()

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

Definition at line 445 of file Repository.h.


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