- add sat::Capability
[platform/upstream/libzypp.git] / zypp / sat / detail / PoolMember.h
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/sat/detail/PoolMember.h
10  *
11 */
12 #ifndef ZYPP_SAT_DETAIL_POOLMEMBER_H
13 #define ZYPP_SAT_DETAIL_POOLMEMBER_H
14
15 #include "zypp/base/Iterator.h"
16
17 extern "C"
18 {
19 struct _Solvable;
20 struct _Repo;
21 struct _Pool;
22 }
23
24 ///////////////////////////////////////////////////////////////////
25 namespace zypp
26 { /////////////////////////////////////////////////////////////////
27   ///////////////////////////////////////////////////////////////////
28   namespace sat
29   { /////////////////////////////////////////////////////////////////
30
31     class IdStr;
32     class Capability;
33     class Capabilities;
34     class Solvable;
35     class Repo;
36     class Pool;
37
38     ///////////////////////////////////////////////////////////////////
39     namespace detail
40     { /////////////////////////////////////////////////////////////////
41
42       class PoolImpl;
43
44       ///////////////////////////////////////////////////////////////////
45       //
46       //        CLASS NAME : PoolMember
47       //
48       /** Backlink to the associated \ref PoolImpl.
49        * Simple as we currently use one global PoolImpl. If we change our
50        * minds this is where we'd store and do the \c Id to \ref PoolImpl
51        * mapping.
52        */
53       struct PoolMember
54       {
55         static PoolImpl & myPool();
56       };
57       ///////////////////////////////////////////////////////////////////
58
59       /////////////////////////////////////////////////////////////////
60     } // namespace detail
61     ///////////////////////////////////////////////////////////////////
62
63
64     ///////////////////////////////////////////////////////////////////
65     namespace detail
66     { /////////////////////////////////////////////////////////////////
67
68       /** Generic Id type. */
69       typedef int IdType;
70       static const IdType noId( 0 );
71
72       /** Id type to connect \ref Solvable and sat-solvable.
73        * Indext into solvable array.
74       */
75       typedef unsigned SolvableIdType;
76       /** Id to denote \ref Solvable::nosolvable. */
77       static const SolvableIdType noSolvableId( 0 );
78
79       /** Id type to connect \ref Repo and sat-repo. */
80       typedef ::_Repo * RepoIdType;
81       /** Id to denote \ref Repo::nosolvable. */
82       static const RepoIdType noRepoId( 0 );
83
84       /////////////////////////////////////////////////////////////////
85     } // namespace detail
86     ///////////////////////////////////////////////////////////////////
87
88
89     ///////////////////////////////////////////////////////////////////
90     namespace detail
91     { /////////////////////////////////////////////////////////////////
92
93       class SolvableIterator;
94       class RepoIterator;
95       class ByRepo;
96
97       /////////////////////////////////////////////////////////////////
98     } // namespace detail
99     ///////////////////////////////////////////////////////////////////
100
101     ///////////////////////////////////////////////////////////////////
102     typedef IdStr KindId;
103     typedef IdStr NameId;
104     typedef IdStr EvrId;
105     typedef IdStr ArchId;
106     typedef IdStr VendorId;
107     ///////////////////////////////////////////////////////////////////
108
109     /////////////////////////////////////////////////////////////////
110   } // namespace sat
111   ///////////////////////////////////////////////////////////////////
112   /////////////////////////////////////////////////////////////////
113 } // namespace zypp
114 ///////////////////////////////////////////////////////////////////
115 #endif // ZYPP_SAT_DETAIL_POOLMEMBER_H