zypp::ResStore Class Reference

#include <ResStore.h>

List of all members.

Public Types

typedef ResObject ResT
 Type of Resolvable provided by ResStore.
typedef
StorageT::value_type 
value_type
typedef
StorageT::const_reference 
const_reference
typedef
StorageT::size_type 
size_type
typedef
StorageT::iterator 
iterator
typedef
StorageT::const_iterator 
const_iterator
typedef
boost::filter_iterator
< resfilter::ResFilter,
const_iterator
resfilter_const_iterator

Public Member Functions

 ResStore ()
 Default ctor.
 ~ResStore ()
 Dtor.
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
bool empty () const
size_type size () const
iterator insert (const ResT::Ptr &ptr_r)
iterator insert (iterator position, const value_type &v)
template<class _InputIterator>
void insert (_InputIterator first_r, _InputIterator last_r)
size_type erase (const ResT::Ptr &ptr_r)
void erase (iterator pos_r)
void erase (iterator first_r, iterator last_r)
void erase (const Resolvable::Kind &kind_r)
 Erase by Kind.
template<class _Res>
void erase ()
 Erase by Kind.
void clear ()
template<class _Function, class _Filter>
int forEach (_Filter filter_r, _Function fnc_r) const
 Query inerface.
template<class _Function>
int forEach (_Function fnc_r) const

Private Types

typedef std::set
< ResT::Ptr
StorageT

Private Member Functions

StorageTstore ()
const StorageTstore () const

Private Attributes

StorageT _store
RW_pointer< Impl_pimpl
 Pointer to implementation.

Friends

std::ostream & operator<< (std::ostream &str, const ResStore &obj)
 Stream output.

Classes

struct  Impl
 ResStore implementation. More...


Detailed Description

Definition at line 32 of file ResStore.h.


Member Typedef Documentation

typedef ResObject zypp::ResStore::ResT

Type of Resolvable provided by ResStore.

Definition at line 38 of file ResStore.h.

typedef std::set<ResT::Ptr> zypp::ResStore::StorageT [private]

Definition at line 44 of file ResStore.h.

typedef StorageT::value_type zypp::ResStore::value_type

Definition at line 47 of file ResStore.h.

typedef StorageT::const_reference zypp::ResStore::const_reference

Definition at line 48 of file ResStore.h.

typedef StorageT::size_type zypp::ResStore::size_type

Definition at line 49 of file ResStore.h.

typedef StorageT::iterator zypp::ResStore::iterator

Definition at line 50 of file ResStore.h.

typedef StorageT::const_iterator zypp::ResStore::const_iterator

Definition at line 51 of file ResStore.h.

typedef boost::filter_iterator<resfilter::ResFilter, const_iterator> zypp::ResStore::resfilter_const_iterator

Definition at line 52 of file ResStore.h.


Constructor & Destructor Documentation

zypp::ResStore::ResStore (  ) 

Default ctor.

Definition at line 67 of file ResStore.cc.

zypp::ResStore::~ResStore (  ) 

Dtor.

Definition at line 76 of file ResStore.cc.


Member Function Documentation

iterator zypp::ResStore::begin (  )  [inline]

Definition at line 62 of file ResStore.h.

References store().

Referenced by zypp::zypp_detail::ZYppImpl::addResolvables(), zypp::detail::PatchImplIf::all_atoms(), zypp::target::TargetImpl::byKindBegin(), erase(), zypp::ResPoolManager::insert(), zypp::zypp_detail::ZYppImpl::removeResolvables(), and zypp::target::TargetImpl::whoOwnsFile().

iterator zypp::ResStore::end (  )  [inline]

Definition at line 65 of file ResStore.h.

References store().

Referenced by zypp::zypp_detail::ZYppImpl::addResolvables(), zypp::detail::PatchImplIf::all_atoms(), zypp::target::TargetImpl::byKindBegin(), zypp::target::TargetImpl::byKindEnd(), erase(), zypp::ResPoolManager::insert(), zypp::zypp_detail::ZYppImpl::removeResolvables(), and zypp::target::TargetImpl::whoOwnsFile().

const_iterator zypp::ResStore::begin (  )  const [inline]

Definition at line 68 of file ResStore.h.

References store().

const_iterator zypp::ResStore::end (  )  const [inline]

Definition at line 71 of file ResStore.h.

References store().

bool zypp::ResStore::empty (  )  const [inline]

Definition at line 75 of file ResStore.h.

References store().

size_type zypp::ResStore::size (  )  const [inline]

Definition at line 78 of file ResStore.h.

References store().

Referenced by zypp::operator<<().

iterator zypp::ResStore::insert ( const ResT::Ptr ptr_r  )  [inline]

Definition at line 83 of file ResStore.h.

References store().

Referenced by zypp::solver::detail::assertSystemResObjectInPool(), zypp::repo::cached::RepoImpl::createResolvables(), and zypp::target::TargetImpl::loadKindResolvables().

iterator zypp::ResStore::insert ( iterator  position,
const value_type v 
) [inline]

Definition at line 87 of file ResStore.h.

References store().

template<class _InputIterator>
void zypp::ResStore::insert ( _InputIterator  first_r,
_InputIterator  last_r 
) [inline]

Definition at line 92 of file ResStore.h.

References store().

size_type zypp::ResStore::erase ( const ResT::Ptr ptr_r  )  [inline]

Definition at line 95 of file ResStore.h.

References store().

void zypp::ResStore::erase ( iterator  pos_r  )  [inline]

Definition at line 98 of file ResStore.h.

References store().

void zypp::ResStore::erase ( iterator  first_r,
iterator  last_r 
) [inline]

Definition at line 101 of file ResStore.h.

References store().

void zypp::ResStore::erase ( const Resolvable::Kind kind_r  )  [inline]

Erase by Kind.

Definition at line 104 of file ResStore.h.

References begin(), end(), and store().

template<class _Res>
void zypp::ResStore::erase (  )  [inline]

Erase by Kind.

Definition at line 118 of file ResStore.h.

void zypp::ResStore::clear (  )  [inline]

Definition at line 121 of file ResStore.h.

References store().

Referenced by zypp::target::TargetImpl::reset().

template<class _Function, class _Filter>
int zypp::ResStore::forEach ( _Filter  filter_r,
_Function  fnc_r 
) const [inline]

Query inerface.

Both, filter_r and fnc_r are expected to be functions or functors taking a ResT::Ptr as argument and return a bool.

forEach iterates over all ResTs and invokes fnc_r, iff filter_r returned true. If fnc_r returnes false the loop is aborted.

forEach returns the number of fnc_r invocations. Positive if the loop succeeded. Negative if some call to fnc_r returned false. +

See also:
Filter functors operating on ResObjects. for a collection of predefined filters.

Definition at line 140 of file ResStore.h.

References _store.

template<class _Function>
int zypp::ResStore::forEach ( _Function  fnc_r  )  const [inline]

Definition at line 156 of file ResStore.h.

References _store.

StorageT& zypp::ResStore::store (  )  [inline, private]

Definition at line 172 of file ResStore.h.

References _store.

Referenced by begin(), clear(), empty(), end(), erase(), insert(), and size().

const StorageT& zypp::ResStore::store (  )  const [inline, private]

Definition at line 175 of file ResStore.h.

References _store.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const ResStore obj 
) [friend]

Stream output.

Definition at line 96 of file ResStore.cc.


Member Data Documentation

StorageT zypp::ResStore::_store [private]

Definition at line 170 of file ResStore.h.

Referenced by forEach(), and store().

RW_pointer<Impl> zypp::ResStore::_pimpl [private]

Pointer to implementation.

Definition at line 180 of file ResStore.h.


The documentation for this class was generated from the following files:
Generated on Tue Sep 25 19:23:16 2007 for libzypp by  doxygen 1.5.3