Imported Upstream version 14.45.0
[platform/upstream/libzypp.git] / zypp / sat / detail / PoolMember.h
index 82f4337..0cd0fdc 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef ZYPP_SAT_DETAIL_POOLMEMBER_H
 #define ZYPP_SAT_DETAIL_POOLMEMBER_H
 
+#include "zypp/base/Tr1hash.h"
 #include "zypp/base/Iterator.h"
 #include "zypp/base/String.h"
 #include "zypp/base/Easy.h"
@@ -23,16 +24,6 @@ struct _Repo;
 struct _Pool;
 }
 
-#define ZYPP_DEFINE_ID_HASHABLE(C)           \
-namespace std { namespace tr1 {              \
-  template<class _Tp> struct hash;           \
-  template<> struct hash<C>                  \
-  {                                          \
-    size_t operator()( const C & __s ) const \
-    { return __s.id(); }                     \
-  };                                         \
-}}
-
 ///////////////////////////////////////////////////////////////////
 namespace zypp
 { /////////////////////////////////////////////////////////////////
@@ -40,14 +31,22 @@ namespace zypp
   class IdString;
   class Capability;
   class Capabilities;
+  class Repository;
+  class RepoInfo;
+
+  ///////////////////////////////////////////////////////////////////
+  namespace detail
+  {
+    class RepoIterator;
+    class ByRepository;
+  }
 
   ///////////////////////////////////////////////////////////////////
   namespace sat
   { /////////////////////////////////////////////////////////////////
 
-    class Solvable;
-    class Repo;
     class Pool;
+    class Solvable;
 
     ///////////////////////////////////////////////////////////////////
     namespace detail
@@ -87,8 +86,8 @@ namespace zypp
       /** Internal ids satlib includes in dependencies.
        * MPL check in PoolImpl.cc
       */
-      static const IdType solvablePrereqMarker( 16 );
-      static const IdType solvableFileMarker  ( 17 );
+      static const IdType solvablePrereqMarker( 15 );
+      static const IdType solvableFileMarker  ( 16 );
       /** Test for internal ids satlib includes in dependencies. */
       inline bool isDepMarkerId( IdType id_r )
       { return( id_r == solvablePrereqMarker || id_r == solvableFileMarker ); }
@@ -98,12 +97,14 @@ namespace zypp
       */
       typedef unsigned SolvableIdType;
       typedef SolvableIdType size_type;
-     /** Id to denote \ref Solvable::nosolvable. */
+      /** Id to denote \ref Solvable::noSolvable. */
       static const SolvableIdType noSolvableId( 0 );
+      /** Id to denote the usually hidden \ref Solvable::systemSolvable. */
+      static const SolvableIdType systemSolvableId( 1 );
 
       /** Id type to connect \ref Repo and sat-repo. */
       typedef ::_Repo * RepoIdType;
-      /** Id to denote \ref Repo::nosolvable. */
+      /** Id to denote \ref Repo::noRepository. */
       static const RepoIdType noRepoId( 0 );
 
       /////////////////////////////////////////////////////////////////
@@ -116,8 +117,6 @@ namespace zypp
     { /////////////////////////////////////////////////////////////////
 
       class SolvableIterator;
-      class RepoIterator;
-      class ByRepo;
 
       /////////////////////////////////////////////////////////////////
     } // namespace detail