libzypp  17.3.1
ResolverNamespace.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
11 #ifndef ZYPP_RESOLVERNAMESPACE_H
12 #define ZYPP_RESOLVERNAMESPACE_H
13 
14 #include <iosfwd>
15 #include <cstdint>
16 
17 #include "zypp/base/Flags.h"
18 #include "zypp/IdString.h"
19 
21 namespace zypp
22 {
24  enum class ResolverNamespace : std::uint8_t
25  {
26  language = 1<<0,
27  modalias = 1<<1,
28  filesystem = 1<<2,
29  };
30 
33 
35  inline constexpr IdString asIdString( ResolverNamespace obj )
36  {
41  }
42 
44  inline std::string asString( ResolverNamespace obj )
45  { return asIdString( obj ).asString(); }
46 
48  inline std::ostream & operator<<( std::ostream & str, ResolverNamespace obj )
49  { return str << asIdString( obj ); }
50 
52  inline std::ostream & operator<<( std::ostream & str, ResolverNamespaces obj )
53  {
54  return str << stringify( obj, {
55  { ResolverNamespace::language, "language" },
56  { ResolverNamespace::modalias, "modalias" },
57  { ResolverNamespace::filesystem, "filesystem" },
58  }, "namespace:", "|", "" );
59  }
60 
61 } // namespace zypp
63 #endif // ZYPP_RESOLVERNAMESPACE_H
static const IdType namespaceModalias(18)
std::string asString(const DefaultIntegral< Tp, TInitial > &obj)
String related utilities and Regular expression matching.
#define ZYPP_DECLARE_FLAGS_AND_OPERATORS(Name, Enum)
Definition: Flags.h:189
Access to the sat-pools string space.
Definition: IdString.h:41
ResolverNamespace
The resolvers dependency namespaces.
std::ostream & operator<<(std::ostream &str, const Exception &obj)
Definition: Exception.cc:147
static const IdType namespaceFilesystem(21)
static const IdType namespaceLanguage(20)
static const IdType noId(0)
Easy-to use interface to the ZYPP dependency resolver.
Definition: CodePitfalls.doc:1