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/Tr1hash.h"
16 #include "zypp/base/Iterator.h"
17 #include "zypp/base/String.h"
18 #include "zypp/base/Easy.h"
27 ///////////////////////////////////////////////////////////////////
29 { /////////////////////////////////////////////////////////////////
37 ///////////////////////////////////////////////////////////////////
44 ///////////////////////////////////////////////////////////////////
46 { /////////////////////////////////////////////////////////////////
51 ///////////////////////////////////////////////////////////////////
53 { /////////////////////////////////////////////////////////////////
57 ///////////////////////////////////////////////////////////////////
59 // CLASS NAME : PoolMember
61 /** Backlink to the associated \ref PoolImpl.
62 * Simple as we currently use one global PoolImpl. If we change our
63 * minds this is where we'd store and do the \c Id to \ref PoolImpl
68 static PoolImpl & myPool();
70 ///////////////////////////////////////////////////////////////////
72 /////////////////////////////////////////////////////////////////
74 ///////////////////////////////////////////////////////////////////
77 ///////////////////////////////////////////////////////////////////
79 { /////////////////////////////////////////////////////////////////
81 /** Generic Id type. */
83 static const IdType noId( 0 );
84 static const IdType emptyId( 1 );
86 /** Internal ids satlib includes in dependencies.
87 * MPL check in PoolImpl.cc
89 static const IdType solvablePrereqMarker( 15 );
90 static const IdType solvableFileMarker ( 16 );
91 /** Test for internal ids satlib includes in dependencies. */
92 inline bool isDepMarkerId( IdType id_r )
93 { return( id_r == solvablePrereqMarker || id_r == solvableFileMarker ); }
95 /** Id type to connect \ref Solvable and sat-solvable.
96 * Indext into solvable array.
98 typedef unsigned SolvableIdType;
99 typedef SolvableIdType size_type;
100 /** Id to denote \ref Solvable::noSolvable. */
101 static const SolvableIdType noSolvableId( 0 );
102 /** Id to denote the usually hidden \ref Solvable::systemSolvable. */
103 static const SolvableIdType systemSolvableId( 1 );
105 /** Id type to connect \ref Repo and sat-repo. */
106 typedef ::_Repo * RepoIdType;
107 /** Id to denote \ref Repo::noRepository. */
108 static const RepoIdType noRepoId( 0 );
110 /////////////////////////////////////////////////////////////////
111 } // namespace detail
112 ///////////////////////////////////////////////////////////////////
115 ///////////////////////////////////////////////////////////////////
117 { /////////////////////////////////////////////////////////////////
119 class SolvableIterator;
121 /////////////////////////////////////////////////////////////////
122 } // namespace detail
123 ///////////////////////////////////////////////////////////////////
125 /////////////////////////////////////////////////////////////////
127 ///////////////////////////////////////////////////////////////////
128 /////////////////////////////////////////////////////////////////
130 ///////////////////////////////////////////////////////////////////
131 #endif // ZYPP_SAT_DETAIL_POOLMEMBER_H