zypp::Repository::EraseFromPool Struct Reference

Functor removing Repository from it's Pool. More...

#include <Repository.h>

List of all members.

Public Member Functions

void operator() (Repository repository_r) const


Detailed Description

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.


Member Function Documentation

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

Definition at line 386 of file Repository.h.

References zypp::Repository::eraseFromPool().


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

doxygen