1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/pool/PoolTraits.h
12 #ifndef ZYPP_POOL_POOLTRAITS_H
13 #define ZYPP_POOL_POOLTRAITS_H
18 #include "zypp/base/Iterator.h"
20 #include "zypp/PoolItem.h"
21 #include "zypp/sat/Pool.h"
23 ///////////////////////////////////////////////////////////////////
25 { /////////////////////////////////////////////////////////////////
30 ///////////////////////////////////////////////////////////////////
32 { /////////////////////////////////////////////////////////////////
38 bool operator()( const PoolItem & pi ) const
42 ///////////////////////////////////////////////////////////////////
44 // CLASS NAME : PoolTraits
50 typedef sat::detail::SolvableIdType SolvableIdType;
53 typedef std::map<sat::Solvable,PoolItem> ItemContainerT;
54 typedef MapKVIteratorTraits<ItemContainerT>::Value_const_iterator
57 typedef std::vector<PoolItem> ItemContainerT;
58 typedef ItemContainerT::const_iterator item_iterator;
59 typedef filter_iterator<ByPoolItem,ItemContainerT::const_iterator>
61 typedef ItemContainerT::size_type size_type;
63 // internal organization
64 typedef std::list<zypp::CapAndItem> CapItemContainerT; // (why,who) pairs
65 typedef std::map<std::string,CapItemContainerT> CapItemStoreT; // capability.index -> (why,who) pairs
66 typedef std::map<Dep,CapItemStoreT> DepCapItemContainerT; // Dep -> (capability.index -> (why,who) pairs)
68 typedef CapItemContainerT::iterator capitemiterator;
69 typedef CapItemContainerT::const_iterator const_capitemiterator;
70 typedef CapItemContainerT::size_type capitemsize_type;
71 /** hashed by capability index */
72 typedef const_capitemiterator byCapabilityIndex_iterator;
74 /* list of known Repositories */
75 typedef std::list<Repository> RepoContainerT;
76 typedef RepoContainerT::const_iterator repository_iterator;
78 typedef PoolImpl Impl;
79 typedef shared_ptr<PoolImpl> Impl_Ptr;
80 typedef shared_ptr<const PoolImpl> Impl_constPtr;
82 /** Map of Capabilities and "who" has set it*/
83 typedef std::map<ResStatus::TransactByValue,Capabilities> AdditionalCapabilities;
86 ///////////////////////////////////////////////////////////////////
88 /////////////////////////////////////////////////////////////////
90 ///////////////////////////////////////////////////////////////////
91 /////////////////////////////////////////////////////////////////
93 ///////////////////////////////////////////////////////////////////
94 #endif // ZYPP_POOL_POOLTRAITS_H