libzypp 17.31.7
PoolTraits.h
Go to the documentation of this file.
1/*---------------------------------------------------------------------\
2| ____ _ __ __ ___ |
3| |__ / \ / / . \ . \ |
4| / / \ V /| _/ _/ |
5| / /__ | | | | | | |
6| /_____||_| |_| |_| |
7| |
8\---------------------------------------------------------------------*/
12#ifndef ZYPP_POOL_POOLTRAITS_H
13#define ZYPP_POOL_POOLTRAITS_H
14
15#include <set>
16#include <map>
17#include <list>
18#include <vector>
19
20#include <zypp/base/Iterator.h>
21#include <zypp/base/Hash.h>
22
23#include <zypp/PoolItem.h>
24#include <zypp/pool/ByIdent.h>
25#include <zypp/sat/Pool.h>
26
28namespace zypp
29{
30
31 class PoolQuery;
32
34 namespace pool
35 {
36
37 class PoolImpl;
38
41 {
42 bool operator()( const PoolItem & pi ) const
43 { return bool(pi); }
44 };
45
48 template<typename TPair>
50 {
51 typename TPair::second_type&
52 operator()(TPair& __x) const
53 { return __x.second; }
54
55 const typename TPair::second_type&
56 operator()(const TPair& __x) const
57 { return __x.second; }
58 };
59
61 //
62 // CLASS NAME : PoolTraits
63 //
66 {
67 public:
69
71 typedef std::vector<PoolItem> ItemContainerT;
72 typedef ItemContainerT::const_iterator item_iterator;
73 typedef filter_iterator<ByPoolItem,ItemContainerT::const_iterator>
76
78 typedef std::unordered_multimap<sat::detail::IdType, PoolItem>
81 typedef transform_iterator<Id2ItemValueSelector, Id2ItemT::const_iterator>
83
86
88 typedef std::list<PoolQuery> HardLockQueries;
89 typedef HardLockQueries::const_iterator hardLockQueries_iterator;
90
91 typedef PoolImpl Impl;
92 typedef shared_ptr<PoolImpl> Impl_Ptr;
93 typedef shared_ptr<const PoolImpl> Impl_constPtr;
94 };
96
98 } // namespace pool
101} // namespace zypp
103#endif // ZYPP_POOL_POOLTRAITS_H
Combining sat::Solvable and ResStatus.
Definition: PoolItem.h:51
SolvableIdType size_type
Definition: PoolMember.h:126
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
Definition: PoolMember.h:125
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:2
Pool internal filter skiping invalid/unwanted PoolItems.
Definition: PoolTraits.h:41
bool operator()(const PoolItem &pi) const
Definition: PoolTraits.h:42
std::_Select2nd
Definition: PoolTraits.h:50
const TPair::second_type & operator()(const TPair &__x) const
Definition: PoolTraits.h:56
TPair::second_type & operator()(TPair &__x) const
Definition: PoolTraits.h:52
filter_iterator< ByPoolItem, ItemContainerT::const_iterator > const_iterator
Definition: PoolTraits.h:74
shared_ptr< PoolImpl > Impl_Ptr
Definition: PoolTraits.h:92
std::vector< PoolItem > ItemContainerT
pure items
Definition: PoolTraits.h:71
transform_iterator< Id2ItemValueSelector, Id2ItemT::const_iterator > byIdent_iterator
Definition: PoolTraits.h:82
P_Select2nd< Id2ItemT::value_type > Id2ItemValueSelector
Definition: PoolTraits.h:80
ItemContainerT::const_iterator item_iterator
Definition: PoolTraits.h:72
std::unordered_multimap< sat::detail::IdType, PoolItem > Id2ItemT
ident index
Definition: PoolTraits.h:79
std::list< PoolQuery > HardLockQueries
hard locks from etc/zypp/locks
Definition: PoolTraits.h:88
HardLockQueries::const_iterator hardLockQueries_iterator
Definition: PoolTraits.h:89
sat::Pool::RepositoryIterator repository_iterator
list of known Repositories
Definition: PoolTraits.h:85
shared_ptr< const PoolImpl > Impl_constPtr
Definition: PoolTraits.h:93
sat::detail::SolvableIdType SolvableIdType
Definition: PoolTraits.h:68
ItemContainerT::size_type size_type
Definition: PoolTraits.h:75