libzypp: zypp::ResPoolProxy Class Reference

libzypp 17.38.10

zypp::ResPoolProxy Class Reference

ResPool::instance().proxy();. More...

`#include <zypp/ResPoolProxy.h>`

## Classes
class | ScopedSaveState
| Exception safe scoped save/restore state. More...
struct | Impl
| ResPoolProxy implementation. More...

## Public Types
using | const_iterator = MapKVIteratorTraits<SelectablePool>::Value_const_iterator
using | size_type = SelectablePool::size_type
using | repository_iterator = ResPool::repository_iterator

## Public Member Functions
| ResPoolProxy ()
| Default ctor: no pool Nonempty proxies are provided by ResPool.
| ~ResPoolProxy ()
| Dtor.
Lookup individual Selectables.
ui::Selectable::Ptr | lookup (const pool::ByIdent &ident_r) const
ui::Selectable::Ptr | lookup (IdString ident_r) const
ui::Selectable::Ptr | lookup (ResKind kind_r, const std::string &name_r) const
ui::Selectable::Ptr | lookup (const sat::Solvable &solv_r) const
ui::Selectable::Ptr | lookup (const ResObject::constPtr &resolvable_r) const
ui::Selectable::Ptr | lookup (const PoolItem &pi_r) const
Iterate through all Selectables of a all kind.
bool | empty () const
size_type | size () const
const_iterator | begin () const
const_iterator | end () const
Iterate through all Selectables of a certain kind.
bool | empty (const ResKind &kind_r) const
| True if there are items of a certain kind.
template<class TRes>
bool | empty () const
size_type | size (const ResKind &kind_r) const
| Number of Items of a certain kind.
template<class TRes>
size_type | size () const
const_iterator | byKindBegin (const ResKind &kind_r) const
template<class TRes>
const_iterator | byKindBegin () const
const_iterator | byKindEnd (const ResKind &kind_r) const
template<class TRes>
const_iterator | byKindEnd () const
Iterable< const_iterator > | byKind (const ResKind &kind_r) const
template<class TRes>
Iterable< const_iterator > | byKind () const
Iterate through all Repositories that contribute ResObjects.
size_type | knownRepositoriesSize () const
repository_iterator | knownRepositoriesBegin () const
repository_iterator | knownRepositoriesEnd () const
Iterable< repository_iterator > | knownRepositories () const
bool | hasInstalledObj (const ResKind &kind_r) const
| Test whether there is at least one ui::Selectable with an installed object.
template<class TRes>
bool | hasInstalledObj () const

## Private Types
using | SelectablePool = std::multimap<ResKind, ui::Selectable::Ptr>

## Friends
std::ostream & | operator<< (std::ostream &str, const ResPoolProxy &obj)
| relates: ResPoolProxy Stream output
std::ostream & | dumpOn (std::ostream &str, const ResPoolProxy &obj)
| relates: ResPoolProxy Verbose stream output

## Save and restore state per kind of resolvable.
Simple version, no safety net. So don't restore or diff, if you didn't save before. Diff returns true, if current stat differs from the saved state. Use scopedSaveState for exception safe scoped save/restore
class | pool::PoolImpl
RW_pointer< Impl > | _pimpl
| Pointer to implementation.
void | saveState () const
void | saveState (const ResKind &kind_r) const
template<class TRes>
void | saveState () const
void | restoreState () const
void | restoreState (const ResKind &kind_r) const
template<class TRes>
void | restoreState () const
bool | diffState () const
bool | diffState (const ResKind &kind_r) const
template<class TRes>
bool | diffState () const
ScopedSaveState | scopedSaveState () const
ScopedSaveState | scopedSaveState (const ResKind &kind_r) const
template<class TRes>
ScopedSaveState && | scopedSaveState () const
template<class TFilter>
filter_iterator< TFilter, const_iterator > | make_begin (TFilter filter_r, const ResKind &kind_r) const
template<class TFilter>
filter_iterator< TFilter, const_iterator > | make_begin (const ResKind &kind_r) const
template<class TFilter>
filter_iterator< TFilter, const_iterator > | make_end (TFilter filter_r, const ResKind &kind_r) const
template<class TFilter>
filter_iterator< TFilter, const_iterator > | make_end (const ResKind &kind_r) const
| ResPoolProxy (ResPool pool_r, const pool::PoolImpl &poolImpl_r)
| Ctor.

## Detailed Description

ResPool::instance().proxy();.

Todo
  integrate it into ResPool

Definition at line 35 of file ResPoolProxy.h.

## Member Typedef Documentation

## ◆ SelectablePool

using zypp::ResPoolProxy::SelectablePool = std::multimap<ResKind, ui::Selectable::Ptr>
| private

Definition at line 39 of file ResPoolProxy.h.

## ◆ const_iterator

using zypp::ResPoolProxy::const_iterator = MapKVIteratorTraits<SelectablePool>::Value_const_iterator

Definition at line 45 of file ResPoolProxy.h.

## ◆ size_type

using zypp::ResPoolProxy::size_type = SelectablePool::size_type

Definition at line 46 of file ResPoolProxy.h.

## ◆ repository_iterator

using zypp::ResPoolProxy::repository_iterator = ResPool::repository_iterator

Definition at line 48 of file ResPoolProxy.h.

## Constructor & Destructor Documentation

## ◆ ResPoolProxy() [1/2]

zypp::ResPoolProxy::ResPoolProxy | ( |  | ) |

Default ctor: no pool Nonempty proxies are provided by ResPool.

See also
  ResPool::proxy
  ResPoolProxy p( ResPool::instance().proxy() );
  zypp::ResPoolProxy::ResPoolProxy
  ResPoolProxy()
  Default ctor: no pool Nonempty proxies are provided by ResPool.
  Definition ResPoolProxy.cc:249
  zypp::ResPool::instance
  static ResPool instance()
  Singleton ctor.
  Definition ResPool.cc:38

Definition at line 249 of file ResPoolProxy.cc.

## ◆ ~ResPoolProxy()

zypp::ResPoolProxy::~ResPoolProxy | ( |  | ) |

Dtor.

Definition at line 267 of file ResPoolProxy.cc.

## ◆ ResPoolProxy() [2/2]

zypp::ResPoolProxy::ResPoolProxy | ( | ResPool | pool_r,
|  | const pool::PoolImpl & | poolImpl_r )
| private

Ctor.

Definition at line 258 of file ResPoolProxy.cc.

## Member Function Documentation

## ◆ lookup() [1/6]

ui::Selectable::Ptr zypp::ResPoolProxy::lookup | ( | const pool::ByIdent & | ident_r | ) | const

Definition at line 276 of file ResPoolProxy.cc.

## ◆ lookup() [2/6]

ui::Selectable::Ptr zypp::ResPoolProxy::lookup | ( | IdString | ident_r | ) | const
| inline

Definition at line 69 of file ResPoolProxy.h.

## ◆ lookup() [3/6]

ui::Selectable::Ptr zypp::ResPoolProxy::lookup | ( | ResKind | kind_r,
|  | const std::string & | name_r ) const
| inline

Definition at line 72 of file ResPoolProxy.h.

## ◆ lookup() [4/6]

ui::Selectable::Ptr zypp::ResPoolProxy::lookup | ( | const sat::Solvable & | solv_r | ) | const
| inline

Definition at line 75 of file ResPoolProxy.h.

## ◆ lookup() [5/6]

ui::Selectable::Ptr zypp::ResPoolProxy::lookup | ( | const ResObject::constPtr & | resolvable_r | ) | const
| inline

Definition at line 78 of file ResPoolProxy.h.

## ◆ lookup() [6/6]

ui::Selectable::Ptr zypp::ResPoolProxy::lookup | ( | const PoolItem & | pi_r | ) | const
| inline

Definition at line 81 of file ResPoolProxy.h.

## ◆ empty() [1/3]

bool zypp::ResPoolProxy::empty | ( |  | ) | const

Definition at line 279 of file ResPoolProxy.cc.

## ◆ size() [1/3]

ResPoolProxy::size_type zypp::ResPoolProxy::size | ( |  | ) | const

Definition at line 282 of file ResPoolProxy.cc.

## ◆ begin()

ResPoolProxy::const_iterator zypp::ResPoolProxy::begin | ( |  | ) | const

Definition at line 285 of file ResPoolProxy.cc.

## ◆ end()

ResPoolProxy::const_iterator zypp::ResPoolProxy::end | ( |  | ) | const

Definition at line 288 of file ResPoolProxy.cc.

## ◆ empty() [2/3]

bool zypp::ResPoolProxy::empty | ( | const ResKind & | kind_r | ) | const

True if there are items of a certain kind.

Definition at line 291 of file ResPoolProxy.cc.

## ◆ empty() [3/3]

template<class TRes>

bool zypp::ResPoolProxy::empty | ( |  | ) | const
| inline

Definition at line 100 of file ResPoolProxy.h.

## ◆ size() [2/3]

ResPoolProxy::size_type zypp::ResPoolProxy::size | ( | const ResKind & | kind_r | ) | const

Number of Items of a certain kind.

Definition at line 294 of file ResPoolProxy.cc.

## ◆ size() [3/3]

template<class TRes>

size_type zypp::ResPoolProxy::size | ( |  | ) | const
| inline

Definition at line 107 of file ResPoolProxy.h.

## ◆ byKindBegin() [1/2]

ResPoolProxy::const_iterator zypp::ResPoolProxy::byKindBegin | ( | const ResKind & | kind_r | ) | const

Definition at line 297 of file ResPoolProxy.cc.

## ◆ byKindBegin() [2/2]

template<class TRes>

const_iterator zypp::ResPoolProxy::byKindBegin | ( |  | ) | const
| inline

Definition at line 113 of file ResPoolProxy.h.

## ◆ byKindEnd() [1/2]

ResPoolProxy::const_iterator zypp::ResPoolProxy::byKindEnd | ( | const ResKind & | kind_r | ) | const

Definition at line 300 of file ResPoolProxy.cc.

## ◆ byKindEnd() [2/2]

template<class TRes>

const_iterator zypp::ResPoolProxy::byKindEnd | ( |  | ) | const
| inline

Definition at line 120 of file ResPoolProxy.h.

## ◆ byKind() [1/2]

Iterable< const_iterator > zypp::ResPoolProxy::byKind | ( | const ResKind & | kind_r | ) | const
| inline

Definition at line 124 of file ResPoolProxy.h.

## ◆ byKind() [2/2]

template<class TRes>

Iterable< const_iterator > zypp::ResPoolProxy::byKind | ( |  | ) | const
| inline

Definition at line 128 of file ResPoolProxy.h.

## ◆ knownRepositoriesSize()

ResPoolProxy::size_type zypp::ResPoolProxy::knownRepositoriesSize | ( |  | ) | const

Definition at line 303 of file ResPoolProxy.cc.

## ◆ knownRepositoriesBegin()

ResPoolProxy::repository_iterator zypp::ResPoolProxy::knownRepositoriesBegin | ( |  | ) | const

Definition at line 306 of file ResPoolProxy.cc.

## ◆ knownRepositoriesEnd()

ResPoolProxy::repository_iterator zypp::ResPoolProxy::knownRepositoriesEnd | ( |  | ) | const

Definition at line 309 of file ResPoolProxy.cc.

## ◆ knownRepositories()

Iterable< repository_iterator > zypp::ResPoolProxy::knownRepositories | ( |  | ) | const
| inline

Definition at line 143 of file ResPoolProxy.h.

## ◆ hasInstalledObj() [1/2]

bool zypp::ResPoolProxy::hasInstalledObj | ( | const ResKind & | kind_r | ) | const
| inline

Test whether there is at least one ui::Selectable with an installed object.

Definition at line 151 of file ResPoolProxy.h.

## ◆ hasInstalledObj() [2/2]

template<class TRes>

bool zypp::ResPoolProxy::hasInstalledObj | ( |  | ) | const
| inline

Definition at line 158 of file ResPoolProxy.h.

## ◆ saveState() [1/3]

void zypp::ResPoolProxy::saveState | ( |  | ) | const

Definition at line 312 of file ResPoolProxy.cc.

## ◆ saveState() [2/3]

void zypp::ResPoolProxy::saveState | ( | const ResKind & | kind_r | ) | const

Definition at line 315 of file ResPoolProxy.cc.

## ◆ saveState() [3/3]

template<class TRes>

void zypp::ResPoolProxy::saveState | ( |  | ) | const
| inline

Definition at line 177 of file ResPoolProxy.h.

## ◆ restoreState() [1/3]

void zypp::ResPoolProxy::restoreState | ( |  | ) | const

Definition at line 318 of file ResPoolProxy.cc.

## ◆ restoreState() [2/3]

void zypp::ResPoolProxy::restoreState | ( | const ResKind & | kind_r | ) | const

Definition at line 321 of file ResPoolProxy.cc.

## ◆ restoreState() [3/3]

template<class TRes>

void zypp::ResPoolProxy::restoreState | ( |  | ) | const
| inline

Definition at line 185 of file ResPoolProxy.h.

## ◆ diffState() [1/3]

bool zypp::ResPoolProxy::diffState | ( |  | ) | const

Definition at line 324 of file ResPoolProxy.cc.

## ◆ diffState() [2/3]

bool zypp::ResPoolProxy::diffState | ( | const ResKind & | kind_r | ) | const

Definition at line 327 of file ResPoolProxy.cc.

## ◆ diffState() [3/3]

template<class TRes>

bool zypp::ResPoolProxy::diffState | ( |  | ) | const
| inline

Definition at line 193 of file ResPoolProxy.h.

## ◆ scopedSaveState() [1/3]

ResPoolProxy::ScopedSaveState zypp::ResPoolProxy::scopedSaveState | ( |  | ) | const
| inline

Definition at line 302 of file ResPoolProxy.h.

## ◆ scopedSaveState() [2/3]

ResPoolProxy::ScopedSaveState zypp::ResPoolProxy::scopedSaveState | ( | const ResKind & | kind_r | ) | const
| inline

Definition at line 305 of file ResPoolProxy.h.

## ◆ scopedSaveState() [3/3]

template<class TRes>

ScopedSaveState && zypp::ResPoolProxy::scopedSaveState | ( |  | ) | const
| inline

Definition at line 210 of file ResPoolProxy.h.

## ◆ make_begin() [1/2]

template<class TFilter>

filter_iterator< TFilter, const_iterator > zypp::ResPoolProxy::make_begin | ( | TFilter | filter_r,
|  | const ResKind & | kind_r ) const
| inlineprivate

Definition at line 218 of file ResPoolProxy.h.

## ◆ make_begin() [2/2]

template<class TFilter>

filter_iterator< TFilter, const_iterator > zypp::ResPoolProxy::make_begin | ( | const ResKind & | kind_r | ) | const
| inlineprivate

Definition at line 226 of file ResPoolProxy.h.

## ◆ make_end() [1/2]

template<class TFilter>

filter_iterator< TFilter, const_iterator > zypp::ResPoolProxy::make_end | ( | TFilter | filter_r,
|  | const ResKind & | kind_r ) const
| inlineprivate

Definition at line 234 of file ResPoolProxy.h.

## ◆ make_end() [2/2]

template<class TFilter>

filter_iterator< TFilter, const_iterator > zypp::ResPoolProxy::make_end | ( | const ResKind & | kind_r | ) | const
| inlineprivate

Definition at line 242 of file ResPoolProxy.h.

## Friends And Related Symbol Documentation

## ◆ pool::PoolImpl

friend class pool::PoolImpl
| friend

Definition at line 248 of file ResPoolProxy.h.

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | str,
|  | const ResPoolProxy & | obj )
| friend

relates: ResPoolProxy Stream output

Definition at line 330 of file ResPoolProxy.cc.

## ◆ dumpOn

std::ostream & dumpOn | ( | std::ostream & | str,
|  | const ResPoolProxy & | obj )
| friend

relates: ResPoolProxy Verbose stream output

Definition at line 333 of file ResPoolProxy.cc.

## Member Data Documentation

## ◆ _pimpl

RW_pointer<Impl> zypp::ResPoolProxy::_pimpl
| private

Pointer to implementation.

Definition at line 252 of file ResPoolProxy.h.

The documentation for this class was generated from the following files:

- zypp/ResPoolProxy.h
- zypp/ResPoolProxy.cc