libzypp  15.28.6
PoolMember.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_SAT_DETAIL_POOLMEMBER_H
13 #define ZYPP_SAT_DETAIL_POOLMEMBER_H
14 
15 #include <solv/solvversion.h>
16 
17 #include "zypp/base/Hash.h"
18 #include "zypp/base/Iterator.h"
19 #include "zypp/base/String.h"
20 #include "zypp/base/Easy.h"
21 
22 extern "C"
23 {
24  // Those _Type names are exposed as sat::detail::CType below!
25 #if ( LIBSOLV_VERSION >= 700 )
26  struct s_Dataiterator;
27  struct s_Datamatcher;
28  struct s_Map;
29  struct s_Pool;
30  struct s_Queue;
31  struct s_Repo;
32  struct s_Solvable;
33  struct s_Solver;
34  struct s_Transaction;
35 #else
36  struct _Dataiterator;
37  struct _Datamatcher;
38  struct _Map;
39  struct _Pool;
40  struct _Queue;
41  struct _Repo;
42  struct _Solvable;
43  struct _Solver;
44  struct _Transaction;
45 #endif
46 }
47 
49 namespace zypp
50 {
51 
52  class IdString;
53  class Capability;
54  class Capabilities;
55  class Repository;
56  class RepoInfo;
57 
59  namespace detail
60  {
61  class RepoIterator;
62  class ByRepository;
63  }
64 
66  namespace sat
67  {
68 
70  namespace detail
71  {
72 #if ( LIBSOLV_VERSION >= 700 )
73  typedef ::s_Dataiterator CDataiterator;
74  typedef ::s_Datamatcher CDatamatcher;
75  typedef ::s_Map CMap;
76  typedef ::s_Pool CPool;
77  typedef ::s_Queue CQueue;
78  typedef ::s_Repo CRepo;
79  typedef ::s_Solvable CSolvable;
80  typedef ::s_Solver CSolver;
81  typedef ::s_Transaction CTransaction;
82 #else
83  typedef ::_Dataiterator CDataiterator;
84  typedef ::_Datamatcher CDatamatcher;
85  typedef ::_Map CMap;
86  typedef ::_Pool CPool;
87  typedef ::_Queue CQueue;
88  typedef ::_Repo CRepo;
89  typedef ::_Solvable CSolvable;
90  typedef ::_Solver CSolver;
91  typedef ::_Transaction CTransaction;
92 #endif
93  } // namespace detail
95 
96  class Pool;
97  class Solvable;
98 
100  namespace detail
101  {
102 
103  class PoolImpl;
104 
106  //
107  // CLASS NAME : PoolMember
108  //
114  struct PoolMember
115  {
116  static PoolImpl & myPool();
117  };
119 
121  } // namespace detail
123 
124 
126  namespace detail
127  {
128 
130  typedef int IdType;
131  static const IdType noId( 0 );
132  static const IdType emptyId( 1 );
133 
137  static const IdType solvablePrereqMarker( 15 );
138  static const IdType solvableFileMarker ( 16 );
139 
140  static const IdType namespaceModalias ( 18 );
141  static const IdType namespaceLanguage ( 20 );
142  static const IdType namespaceFilesystem ( 21 );
143 
145  inline bool isDepMarkerId( IdType id_r )
146  { return( id_r == solvablePrereqMarker || id_r == solvableFileMarker ); }
147 
151  typedef unsigned SolvableIdType;
154  static const SolvableIdType noSolvableId( 0 );
156  static const SolvableIdType systemSolvableId( 1 );
157 
159  typedef CRepo * RepoIdType;
161  static const RepoIdType noRepoId( 0 );
162 
164  } // namespace detail
166 
167 
169  namespace detail
170  {
171 
172  class SolvableIterator;
173 
175  } // namespace detail
177 
179  } // namespace sat
182 } // namespace zypp
184 #endif // ZYPP_SAT_DETAIL_POOLMEMBER_H
static const SolvableIdType noSolvableId(0)
Id to denote Solvable::noSolvable.
static const IdType namespaceModalias(18)
int IdType
Generic Id type.
Definition: PoolMember.h:130
A Solvable object within the sat Pool.
Definition: Solvable.h:53
::_Dataiterator CDataiterator
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:83
::_Repo CRepo
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:88
static const RepoIdType noRepoId(0)
Id to denote Repo::noRepository.
::_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:86
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
Definition: PoolMember.h:151
CRepo * RepoIdType
Id type to connect Repo and sat-repo.
Definition: PoolMember.h:159
::_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:89
static const IdType solvableFileMarker(16)
::_Solver CSolver
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:90
::_Transaction CTransaction
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:91
::_Map CMap
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:85
Backlink to the associated PoolImpl.
Definition: PoolMember.h:114
static const IdType emptyId(1)
static const SolvableIdType systemSolvableId(1)
Id to denote the usually hidden Solvable::systemSolvable.
static PoolImpl & myPool()
Definition: PoolImpl.cc:167
static const IdType namespaceFilesystem(21)
SolvableIdType size_type
Definition: PoolMember.h:152
bool isDepMarkerId(IdType id_r)
Test for internal ids satlib includes in dependencies.
Definition: PoolMember.h:145
static const IdType namespaceLanguage(20)
static const IdType noId(0)
Global sat-pool.
Definition: Pool.h:44
static const IdType solvablePrereqMarker(15)
Internal ids satlib includes in dependencies.
::_Datamatcher CDatamatcher
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:84
::_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:87