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 <solv/solvversion.h>
17 #include "zypp/base/Tr1hash.h"
18 #include "zypp/base/Iterator.h"
19 #include "zypp/base/String.h"
20 #include "zypp/base/Easy.h"
24 // Those _Type names are exposed as sat::detail::CType below!
25 #if ( LIBSOLV_VERSION >= 700 )
26 struct s_Dataiterator;
48 ///////////////////////////////////////////////////////////////////
50 { /////////////////////////////////////////////////////////////////
58 ///////////////////////////////////////////////////////////////////
65 ///////////////////////////////////////////////////////////////////
67 { /////////////////////////////////////////////////////////////////
69 ///////////////////////////////////////////////////////////////////
72 #if ( LIBSOLV_VERSION >= 700 )
73 typedef ::s_Dataiterator CDataiterator; ///< Wrapped libsolv C data type exposed as backdoor
74 typedef ::s_Datamatcher CDatamatcher; ///< Wrapped libsolv C data type exposed as backdoor
75 typedef ::s_Map CMap; ///< Wrapped libsolv C data type exposed as backdoor
76 typedef ::s_Pool CPool; ///< Wrapped libsolv C data type exposed as backdoor
77 typedef ::s_Queue CQueue; ///< Wrapped libsolv C data type exposed as backdoor
78 typedef ::s_Repo CRepo; ///< Wrapped libsolv C data type exposed as backdoor
79 typedef ::s_Solvable CSolvable; ///< Wrapped libsolv C data type exposed as backdoor
80 typedef ::s_Solver CSolver; ///< Wrapped libsolv C data type exposed as backdoor
81 typedef ::s_Transaction CTransaction; ///< Wrapped libsolv C data type exposed as backdoor
83 typedef ::_Dataiterator CDataiterator; ///< Wrapped libsolv C data type exposed as backdoor
84 typedef ::_Datamatcher CDatamatcher; ///< Wrapped libsolv C data type exposed as backdoor
85 typedef ::_Map CMap; ///< Wrapped libsolv C data type exposed as backdoor
86 typedef ::_Pool CPool; ///< Wrapped libsolv C data type exposed as backdoor
87 typedef ::_Queue CQueue; ///< Wrapped libsolv C data type exposed as backdoor
88 typedef ::_Repo CRepo; ///< Wrapped libsolv C data type exposed as backdoor
89 typedef ::_Solvable CSolvable; ///< Wrapped libsolv C data type exposed as backdoor
90 typedef ::_Solver CSolver; ///< Wrapped libsolv C data type exposed as backdoor
91 typedef ::_Transaction CTransaction; ///< Wrapped libsolv C data type exposed as backdoor
94 ///////////////////////////////////////////////////////////////////
99 ///////////////////////////////////////////////////////////////////
101 { /////////////////////////////////////////////////////////////////
105 ///////////////////////////////////////////////////////////////////
107 // CLASS NAME : PoolMember
109 /** Backlink to the associated \ref PoolImpl.
110 * Simple as we currently use one global PoolImpl. If we change our
111 * minds this is where we'd store and do the \c Id to \ref PoolImpl
116 static PoolImpl & myPool();
118 ///////////////////////////////////////////////////////////////////
120 /////////////////////////////////////////////////////////////////
121 } // namespace detail
122 ///////////////////////////////////////////////////////////////////
125 ///////////////////////////////////////////////////////////////////
127 { /////////////////////////////////////////////////////////////////
129 /** Generic Id type. */
131 static const IdType noId( 0 );
132 static const IdType emptyId( 1 );
134 /** Internal ids satlib includes in dependencies.
135 * MPL check in PoolImpl.cc
137 static const IdType solvablePrereqMarker( 15 );
138 static const IdType solvableFileMarker ( 16 );
139 /** Test for internal ids satlib includes in dependencies. */
140 inline bool isDepMarkerId( IdType id_r )
141 { return( id_r == solvablePrereqMarker || id_r == solvableFileMarker ); }
143 /** Id type to connect \ref Solvable and sat-solvable.
144 * Indext into solvable array.
146 typedef unsigned SolvableIdType;
147 typedef SolvableIdType size_type;
148 /** Id to denote \ref Solvable::noSolvable. */
149 static const SolvableIdType noSolvableId( 0 );
150 /** Id to denote the usually hidden \ref Solvable::systemSolvable. */
151 static const SolvableIdType systemSolvableId( 1 );
153 /** Id type to connect \ref Repo and sat-repo. */
154 typedef CRepo * RepoIdType;
155 /** Id to denote \ref Repo::noRepository. */
156 static const RepoIdType noRepoId( 0 );
158 /////////////////////////////////////////////////////////////////
159 } // namespace detail
160 ///////////////////////////////////////////////////////////////////
163 ///////////////////////////////////////////////////////////////////
165 { /////////////////////////////////////////////////////////////////
167 class SolvableIterator;
169 /////////////////////////////////////////////////////////////////
170 } // namespace detail
171 ///////////////////////////////////////////////////////////////////
173 /////////////////////////////////////////////////////////////////
175 ///////////////////////////////////////////////////////////////////
176 /////////////////////////////////////////////////////////////////
178 ///////////////////////////////////////////////////////////////////
179 #endif // ZYPP_SAT_DETAIL_POOLMEMBER_H