libzypp  11.13.5
Modalias.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_TARGET_MODALIAS_MODALIAS_H
13 #define ZYPP_TARGET_MODALIAS_MODALIAS_H
14 
15 #include <iosfwd>
16 #include <string>
17 
18 #include "zypp/base/PtrTypes.h"
19 #include "zypp/IdString.h"
20 
22 namespace zypp
23 {
24 
25  namespace target
26  {
27 
29  //
30  // CLASS NAME : Modalias
31  //
34  class Modalias
35  {
36  friend std::ostream & operator<<( std::ostream & str, const Modalias & obj );
37 
38  public:
40  class Impl;
41 
42  public:
44  static Modalias & instance();
45 
47  ~Modalias();
48 
49  public:
50 
66  bool query( IdString cap_r ) const
67  { return query( cap_r.c_str() ); }
69  bool query( const char * cap_r ) const;
71  bool query( const std::string & cap_r ) const
72  { return query( cap_r.c_str() ); }
73 
74  private:
76  Modalias();
77 
80  };
82 
84  std::ostream & operator<<( std::ostream & str, const Modalias & obj );
85 
87  } // namespace target
90 } // namespace zypp
92 #endif // ZYPP_TARGET_MODALIAS_MODALIAS_H