libzypp  17.7.0
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 "zypp/base/Hash.h"
16 #include "zypp/base/Iterator.h"
17 #include "zypp/base/String.h"
18 #include "zypp/base/Easy.h"
19 
20 extern "C"
21 {
22  // Those _Type names are exposed as sat::detail::CType below!
23  struct _Dataiterator;
24  struct _Datamatcher;
25  struct _Map;
26  struct _Pool;
27  struct _Queue;
28  struct _Repo;
29  struct _Solvable;
30  struct _Solver;
31  struct _Transaction;
32 }
33 
35 namespace zypp
36 {
37 
38  class IdString;
39  class Capability;
40  class Capabilities;
41  class Repository;
42  class RepoInfo;
43 
45  namespace detail
46  {
47  class RepoIterator;
48  class ByRepository;
49  }
50 
52  namespace sat
53  {
54 
56  namespace detail
57  {
58  typedef ::_Dataiterator CDataiterator;
59  typedef ::_Datamatcher CDatamatcher;
60  typedef ::_Map CMap;
61  typedef ::_Pool CPool;
62  typedef ::_Queue CQueue;
63  typedef ::_Repo CRepo;
64  typedef ::_Solvable CSolvable;
65  typedef ::_Solver CSolver;
66  typedef ::_Transaction CTransaction;
67  } // namespace detail
69 
70  class Pool;
71  class Solvable;
72 
74  namespace detail
75  {
76 
77  class PoolImpl;
78 
80  //
81  // CLASS NAME : PoolMember
82  //
88  struct PoolMember
89  {
90  static PoolImpl & myPool();
91  };
93 
95  } // namespace detail
97 
98 
100  namespace detail
101  {
102 
104  typedef int IdType;
105  static const IdType noId( 0 );
106  static const IdType emptyId( 1 );
107 
111  static const IdType solvablePrereqMarker( 15 );
112  static const IdType solvableFileMarker ( 16 );
113 
114  static const IdType namespaceModalias ( 18 );
115  static const IdType namespaceLanguage ( 20 );
116  static const IdType namespaceFilesystem ( 21 );
117 
119  inline bool isDepMarkerId( IdType id_r )
120  { return( id_r == solvablePrereqMarker || id_r == solvableFileMarker ); }
121 
125  typedef unsigned SolvableIdType;
128  static const SolvableIdType noSolvableId( 0 );
130  static const SolvableIdType systemSolvableId( 1 );
131 
133  typedef ::_Repo * RepoIdType;
135  static const RepoIdType noRepoId( 0 );
136 
138  } // namespace detail
140 
141 
143  namespace detail
144  {
145 
146  class SolvableIterator;
147 
149  } // namespace detail
151 
153  } // namespace sat
156 } // namespace zypp
158 #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:104
A Solvable object within the sat Pool.
Definition: Solvable.h:53
::_Dataiterator CDataiterator
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:58
::_Repo CRepo
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:63
::_Repo * RepoIdType
Id type to connect Repo and sat-repo.
Definition: PoolMember.h:133
static const RepoIdType noRepoId(0)
Id to denote Repo::noRepository.
::_Pool CPool
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:61
unsigned SolvableIdType
Id type to connect Solvable and sat-solvable.
Definition: PoolMember.h:125
::_Solvable CSolvable
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:64
static const IdType solvableFileMarker(16)
::_Solver CSolver
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:65
::_Transaction CTransaction
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:66
::_Map CMap
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:60
Backlink to the associated PoolImpl.
Definition: PoolMember.h:88
static const IdType emptyId(1)
static const SolvableIdType systemSolvableId(1)
Id to denote the usually hidden Solvable::systemSolvable.
static PoolImpl & myPool()
Definition: PoolImpl.cc:172
static const IdType namespaceFilesystem(21)
SolvableIdType size_type
Definition: PoolMember.h:126
bool isDepMarkerId(IdType id_r)
Test for internal ids satlib includes in dependencies.
Definition: PoolMember.h:119
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:59
::_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
Definition: PoolMember.h:62
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1