Modalias.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00012 #ifndef ZYPP_TARGET_MODALIAS_MODALIAS_H
00013 #define ZYPP_TARGET_MODALIAS_MODALIAS_H
00014
00015 #include <iosfwd>
00016 #include <string>
00017
00018 #include "zypp/base/PtrTypes.h"
00019 #include "zypp/IdString.h"
00020
00022 namespace zypp
00023 {
00024
00025 namespace target
00026 {
00027
00029
00030
00031
00034 class Modalias
00035 {
00036 friend std::ostream & operator<<( std::ostream & str, const Modalias & obj );
00037
00038 public:
00040 class Impl;
00041
00042 public:
00044 static Modalias & instance();
00045
00047 ~Modalias();
00048
00049 public:
00050
00066 bool query( IdString cap_r ) const
00067 { return query( cap_r.c_str() ); }
00069 bool query( const char * cap_r ) const;
00071 bool query( const std::string & cap_r ) const
00072 { return query( cap_r.c_str() ); }
00073
00074 private:
00076 Modalias();
00077
00079 RW_pointer<Impl> _pimpl;
00080 };
00082
00084 std::ostream & operator<<( std::ostream & str, const Modalias & obj );
00085
00087 }
00090 }
00092 #endif // ZYPP_TARGET_MODALIAS_MODALIAS_H