zypp::ResPool Class Reference

Access to ResObject pool. More...

#include <ResPool.h>

List of all members.

Iterate through all ResObjects of a certain kind.

typedef resfilter::ByKind ByKind
typedef filter_iterator< ByKind,
const_iterator
byKind_iterator
byKind_iterator byKindBegin (const ResObject::Kind &kind_r) const
template<class _Res>
byKind_iterator byKindBegin () const
byKind_iterator byKindEnd (const ResObject::Kind &kind_r) const
template<class _Res>
byKind_iterator byKindEnd () const

Handling addition capabilities in the pool in order for solving it in

a solver run. This is used for tasks like needing a package with the name "foo". The solver has to evaluate a proper package by his own.

CAUTION: This has another semantic in the solver. The required resolvable has been set for installation (in the pool) only AFTER a solver run.

void setAdditionalRequire (const AdditionalCapSet &capset) const
 Handling additional requirement.
AdditionalCapSetadditionalRequire () const
void setAdditionalConflict (const AdditionalCapSet &capset) const
 Handling additional conflicts.
AdditionalCapSetadditionaConflict () const
void setAdditionalProvide (const AdditionalCapSet &capset) const
 Handling additional provides.
AdditionalCapSetadditionaProvide () const
 ResPool (pool::PoolTraits::Impl_constPtr impl_r)
 Ctor.
pool::PoolTraits::Impl_constPtr _pimpl
 Const access to implementation.
class ResPoolManager

Public Types

typedef pool::PoolTraits::Item Item
 zypp::pool::PoolItem
typedef pool::PoolTraits::size_type size_type
typedef pool::PoolTraits::const_iterator const_iterator
typedef pool::PoolTraits::byName_iterator byName_iterator
typedef pool::PoolTraits::byCapabilityIndex_iterator byCapabilityIndex_iterator
typedef pool::PoolTraits::AdditionalCapSet AdditionalCapSet

Public Member Functions

 ResPool ()
 Default ctor: empty pool.
 ~ResPool ()
 Dtor.
bool empty () const
size_type size () const
Iterate through all ResObjects (all kinds).
const_iterator begin () const
const_iterator end () const
Iterate through all ResObjects with a certain name (all kinds).
byName_iterator byNameBegin (const std::string &name_r) const
byName_iterator byNameEnd (const std::string &name_r) const
Iterate through all ResObjects which have at least
one Capability with index index_r in dependency depType_r.

byCapabilityIndex_iterator byCapabilityIndexBegin (const std::string &index_r, Dep depType_r) const
byCapabilityIndex_iterator byCapabilityIndexEnd (const std::string &index_r, Dep depType_r) const

Friends

std::ostream & operator<< (std::ostream &str, const ResPool &obj)

Related Functions

(Note that these are not member functions.)

int forEachMatchIn (const ResPool &pool_r, const Dep &dep_r, const Capability &lhs_r, function< bool(const CapAndItem &)> action_r)
 Algorithm invoking action_r on each matching Capability in a ResPool.


Detailed Description

Access to ResObject pool.

Note:
Filter iterators provided by ResPool are intended to operate on internal index tables for faster access. If the the index is not yet implemented, they are realized as an ordinary filter iterator. Do not provide filter iterators here, if there is no index table for it.

Definition at line 37 of file ResPool.h.


Member Typedef Documentation

typedef pool::PoolTraits::Item zypp::ResPool::Item
 

zypp::pool::PoolItem

Definition at line 43 of file ResPool.h.

typedef pool::PoolTraits::size_type zypp::ResPool::size_type
 

Definition at line 44 of file ResPool.h.

typedef pool::PoolTraits::const_iterator zypp::ResPool::const_iterator
 

Definition at line 45 of file ResPool.h.

typedef pool::PoolTraits::byName_iterator zypp::ResPool::byName_iterator
 

Definition at line 46 of file ResPool.h.

typedef pool::PoolTraits::byCapabilityIndex_iterator zypp::ResPool::byCapabilityIndex_iterator
 

Definition at line 47 of file ResPool.h.

typedef pool::PoolTraits::AdditionalCapSet zypp::ResPool::AdditionalCapSet
 

Definition at line 48 of file ResPool.h.

typedef resfilter::ByKind zypp::ResPool::ByKind
 

Definition at line 75 of file ResPool.h.

typedef filter_iterator<ByKind,const_iterator> zypp::ResPool::byKind_iterator
 

Definition at line 76 of file ResPool.h.


Constructor & Destructor Documentation

zypp::ResPool::ResPool  ) 
 

Default ctor: empty pool.

Definition at line 39 of file ResPool.cc.

zypp::ResPool::~ResPool  ) 
 

Dtor.

Definition at line 57 of file ResPool.cc.

zypp::ResPool::ResPool pool::PoolTraits::Impl_constPtr  impl_r  )  [private]
 

Ctor.

Definition at line 48 of file ResPool.cc.


Member Function Documentation

bool zypp::ResPool::empty  )  const
 

Definition at line 66 of file ResPool.cc.

References _pimpl.

ResPool::size_type zypp::ResPool::size  )  const
 

Definition at line 69 of file ResPool.cc.

References _pimpl.

ResPool::const_iterator zypp::ResPool::begin  )  const
 

Definition at line 72 of file ResPool.cc.

References _pimpl.

Referenced by zypp::PoolItemSaver::diffState(), zypp::pool::GetResolvablesToInsDel::GetResolvablesToInsDel(), zypp::solver::detail::ProblemSolutionUnlock::ProblemSolutionUnlock(), zypp::PoolItemSaver::restoreState(), zypp::PoolItemSaver::saveState(), and zypp::solver::detail::show_pool().

ResPool::const_iterator zypp::ResPool::end  )  const
 

Definition at line 75 of file ResPool.cc.

References _pimpl.

Referenced by zypp::PoolItemSaver::diffState(), zypp::pool::GetResolvablesToInsDel::GetResolvablesToInsDel(), zypp::solver::detail::ProblemSolutionUnlock::ProblemSolutionUnlock(), zypp::zypp_detail::ZYppImpl::removeInstalledResolvables(), zypp::PoolItemSaver::restoreState(), zypp::PoolItemSaver::saveState(), and zypp::solver::detail::show_pool().

byKind_iterator zypp::ResPool::byKindBegin const ResObject::Kind kind_r  )  const [inline]
 

Definition at line 78 of file ResPool.h.

References zypp::make_filter_begin().

Referenced by zypp::solver::detail::assertSystemResObjectInPool(), zypp::PoolItemSaver::diffState(), zypp::zypp_detail::ZYppImpl::getAvailableLocales(), zypp::zypp_detail::ZYppImpl::getRequestedLocales(), zypp::PoolItemSaver::restoreState(), and zypp::PoolItemSaver::saveState().

template<class _Res>
byKind_iterator zypp::ResPool::byKindBegin  )  const [inline]
 

Definition at line 82 of file ResPool.h.

References zypp::make_filter_begin().

byKind_iterator zypp::ResPool::byKindEnd const ResObject::Kind kind_r  )  const [inline]
 

Definition at line 86 of file ResPool.h.

References zypp::make_filter_end().

Referenced by zypp::solver::detail::assertSystemResObjectInPool(), zypp::PoolItemSaver::diffState(), zypp::zypp_detail::ZYppImpl::getAvailableLocales(), zypp::zypp_detail::ZYppImpl::getRequestedLocales(), zypp::PoolItemSaver::restoreState(), and zypp::PoolItemSaver::saveState().

template<class _Res>
byKind_iterator zypp::ResPool::byKindEnd  )  const [inline]
 

Definition at line 90 of file ResPool.h.

References zypp::make_filter_end().

ResPool::byName_iterator zypp::ResPool::byNameBegin const std::string &  name_r  )  const
 

Definition at line 78 of file ResPool.cc.

References _pimpl.

Referenced by zypp::solver::detail::Helper::findReinstallItem(), zypp::solver::detail::Helper::findUpdateItem(), zypp::ui::PatchContents::Impl::Impl(), zypp::solver::detail::Helper::isBestUninstalledItem(), and zypp::NameKindProxy::NameKindProxy().

ResPool::byName_iterator zypp::ResPool::byNameEnd const std::string &  name_r  )  const
 

Definition at line 81 of file ResPool.cc.

References _pimpl.

Referenced by zypp::solver::detail::Helper::findReinstallItem(), zypp::solver::detail::Helper::findUpdateItem(), zypp::ui::PatchContents::Impl::Impl(), zypp::solver::detail::Helper::isBestUninstalledItem(), and zypp::NameKindProxy::NameKindProxy().

ResPool::byCapabilityIndex_iterator zypp::ResPool::byCapabilityIndexBegin const std::string &  index_r,
Dep  depType_r
const
 

Definition at line 84 of file ResPool.cc.

References _pimpl.

Referenced by forEachMatchIn(), zypp::solver::detail::hint_match(), and zypp::solver::detail::transactCaps().

ResPool::byCapabilityIndex_iterator zypp::ResPool::byCapabilityIndexEnd const std::string &  index_r,
Dep  depType_r
const
 

Definition at line 87 of file ResPool.cc.

References _pimpl.

Referenced by forEachMatchIn(), zypp::solver::detail::hint_match(), zypp::solver::detail::ResolverContext::requirementIsMet(), zypp::solver::detail::ResolverContext::requirementIsPossible(), and zypp::solver::detail::transactCaps().

void zypp::ResPool::setAdditionalRequire const AdditionalCapSet capset  )  const
 

Handling additional requirement.

E.G. need package "foo" and package "foo1" which has a greater version than 1.0:

  CapSet capset;
  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));    
  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo1 > 1.0"));

  // The user is setting this capablility
  ResPool::AdditionalCapSet aCapSet;
  aCapSet[ResStatus::USER] = capset;

  setAdditionalRequire( aCapSet );

Definition at line 90 of file ResPool.cc.

References _pimpl.

ResPool::AdditionalCapSet & zypp::ResPool::additionalRequire  )  const
 

Definition at line 92 of file ResPool.cc.

References _pimpl.

void zypp::ResPool::setAdditionalConflict const AdditionalCapSet capset  )  const
 

Handling additional conflicts.

E.G. do not install anything which provides "foo":

  CapSet capset;    
  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));

  // The user is setting this capablility
  ResPool::AdditionalCapSet aCapSet;
  aCapSet[ResStatus::USER] = capset;

  setAdditionalConflict( aCapSet );    

Definition at line 95 of file ResPool.cc.

References _pimpl.

ResPool::AdditionalCapSet & zypp::ResPool::additionaConflict  )  const
 

Definition at line 97 of file ResPool.cc.

References _pimpl.

void zypp::ResPool::setAdditionalProvide const AdditionalCapSet capset  )  const
 

Handling additional provides.

This is used for ignoring a requirement. e.G. Do ignore the requirement "foo":

  CapSet capset;    
  capset.insert (CapFactory().parse( ResTraits<Package>::kind, "foo"));

  // The user is setting this capablility
  ResPool::AdditionalCapSet aCapSet;
  aCapSet[ResStatus::USER] = capset;

  setAdditionalProvide( aCapSet );    

Definition at line 100 of file ResPool.cc.

References _pimpl.

ResPool::AdditionalCapSet & zypp::ResPool::additionaProvide  )  const
 

Definition at line 102 of file ResPool.cc.

References _pimpl.


Friends And Related Function Documentation

friend class ResPoolManager [friend]
 

Definition at line 177 of file ResPool.h.

std::ostream & operator<< std::ostream &  str,
const ResPool obj
[friend]
 

Stream output

Definition at line 111 of file ResPool.cc.


Member Data Documentation

pool::PoolTraits::Impl_constPtr zypp::ResPool::_pimpl [private]
 

Const access to implementation.

Definition at line 182 of file ResPool.h.

Referenced by additionaConflict(), additionalRequire(), additionaProvide(), begin(), byCapabilityIndexBegin(), byCapabilityIndexEnd(), byNameBegin(), byNameEnd(), empty(), end(), zypp::operator<<(), setAdditionalConflict(), setAdditionalProvide(), setAdditionalRequire(), and size().


The documentation for this class was generated from the following files:
Generated on Thu Apr 24 02:25:08 2008 for zypp by  doxygen 1.4.6