1 /*---------------------------------------------------------------------\
3 | |__ / \ / / . \ . \ |
8 \---------------------------------------------------------------------*/
9 /** \file zypp/sat/detail/PoolMember.h
12 #ifndef ZYPP_SAT_DETAIL_POOLMEMBER_H
13 #define ZYPP_SAT_DETAIL_POOLMEMBER_H
15 #include "zypp/base/Hash.h"
16 #include "zypp/base/Iterator.h"
17 #include "zypp/base/String.h"
18 #include "zypp/base/Easy.h"
22 // Those _Type names are exposed as sat::detail::CType below!
34 ///////////////////////////////////////////////////////////////////
36 { /////////////////////////////////////////////////////////////////
44 ///////////////////////////////////////////////////////////////////
51 ///////////////////////////////////////////////////////////////////
53 { /////////////////////////////////////////////////////////////////
55 ///////////////////////////////////////////////////////////////////
58 typedef ::_Dataiterator CDataiterator; ///< Wrapped libsolv C data type exposed as backdoor
59 typedef ::_Datamatcher CDatamatcher; ///< Wrapped libsolv C data type exposed as backdoor
60 typedef ::_Map CMap; ///< Wrapped libsolv C data type exposed as backdoor
61 typedef ::_Pool CPool; ///< Wrapped libsolv C data type exposed as backdoor
62 typedef ::_Queue CQueue; ///< Wrapped libsolv C data type exposed as backdoor
63 typedef ::_Repo CRepo; ///< Wrapped libsolv C data type exposed as backdoor
64 typedef ::_Solvable CSolvable; ///< Wrapped libsolv C data type exposed as backdoor
65 typedef ::_Solver CSolver; ///< Wrapped libsolv C data type exposed as backdoor
66 typedef ::_Transaction CTransaction; ///< Wrapped libsolv C data type exposed as backdoor
68 ///////////////////////////////////////////////////////////////////
73 ///////////////////////////////////////////////////////////////////
75 { /////////////////////////////////////////////////////////////////
79 ///////////////////////////////////////////////////////////////////
81 // CLASS NAME : PoolMember
83 /** Backlink to the associated \ref PoolImpl.
84 * Simple as we currently use one global PoolImpl. If we change our
85 * minds this is where we'd store and do the \c Id to \ref PoolImpl
90 static PoolImpl & myPool();
92 ///////////////////////////////////////////////////////////////////
94 /////////////////////////////////////////////////////////////////
96 ///////////////////////////////////////////////////////////////////
99 ///////////////////////////////////////////////////////////////////
101 { /////////////////////////////////////////////////////////////////
103 /** Generic Id type. */
105 static const IdType noId( 0 );
106 static const IdType emptyId( 1 );
108 /** Internal ids satlib includes in dependencies.
109 * MPL check in PoolImpl.cc
111 static const IdType solvablePrereqMarker( 15 );
112 static const IdType solvableFileMarker ( 16 );
114 static const IdType namespaceModalias ( 18 );
115 static const IdType namespaceLanguage ( 20 );
116 static const IdType namespaceFilesystem ( 21 );
118 /** Test for internal ids satlib includes in dependencies. */
119 inline bool isDepMarkerId( IdType id_r )
120 { return( id_r == solvablePrereqMarker || id_r == solvableFileMarker ); }
122 /** Id type to connect \ref Solvable and sat-solvable.
123 * Indext into solvable array.
125 typedef unsigned SolvableIdType;
126 typedef SolvableIdType size_type;
127 /** Id to denote \ref Solvable::noSolvable. */
128 static const SolvableIdType noSolvableId( 0 );
129 /** Id to denote the usually hidden \ref Solvable::systemSolvable. */
130 static const SolvableIdType systemSolvableId( 1 );
132 /** Id type to connect \ref Repo and sat-repo. */
133 typedef ::_Repo * RepoIdType;
134 /** Id to denote \ref Repo::noRepository. */
135 static const RepoIdType noRepoId( 0 );
137 /////////////////////////////////////////////////////////////////
138 } // namespace detail
139 ///////////////////////////////////////////////////////////////////
142 ///////////////////////////////////////////////////////////////////
144 { /////////////////////////////////////////////////////////////////
146 class SolvableIterator;
148 /////////////////////////////////////////////////////////////////
149 } // namespace detail
150 ///////////////////////////////////////////////////////////////////
152 /////////////////////////////////////////////////////////////////
154 ///////////////////////////////////////////////////////////////////
155 /////////////////////////////////////////////////////////////////
157 ///////////////////////////////////////////////////////////////////
158 #endif // ZYPP_SAT_DETAIL_POOLMEMBER_H