#include <Modalias.h>
Classes | |
struct | Impl |
Modalias implementation. More... | |
Public Member Functions | |
~Modalias () | |
Dtor. | |
bool | query (IdString cap_r) const |
Checks if a device on the system matches a modalias pattern. | |
bool | query (const char *cap_r) const |
bool | query (const std::string &cap_r) const |
Static Public Member Functions | |
static Modalias & | instance () |
Singleton access. | |
Private Member Functions | |
Modalias () | |
Singleton ctor. | |
Private Attributes | |
RW_pointer< Impl > | _pimpl |
Pointer to implementation. | |
Friends | |
std::ostream & | operator<< (std::ostream &str, const Modalias &obj) |
Definition at line 34 of file Modalias.h.
zypp::target::Modalias::~Modalias | ( | ) |
zypp::target::Modalias::Modalias | ( | ) | [private] |
Modalias & zypp::target::Modalias::instance | ( | ) | [static] |
bool zypp::target::Modalias::query | ( | IdString | cap_r | ) | const [inline] |
Checks if a device on the system matches a modalias pattern.
Returns false
if no matching device is found, and the modalias of the first matching device otherwise. (More than one device may match a given pattern.)
On a system that has the following device,
pci:v00008086d0000265Asv00008086sd00004556bc0Csc03i00
true:
modalias_matches("pci:v00008086d0000265Asv*sd*bc*sc*i*")
Definition at line 66 of file Modalias.h.
References zypp::IdString::c_str(), and query().
Referenced by query().
bool zypp::target::Modalias::query | ( | const char * | cap_r | ) | const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 269 of file Modalias.cc.
References _pimpl.
bool zypp::target::Modalias::query | ( | const std::string & | cap_r | ) | const [inline] |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 71 of file Modalias.h.
References query().
Referenced by query().
std::ostream & operator<< | ( | std::ostream & | str, | |
const Modalias & | obj | |||
) | [friend] |
Stream output
Definition at line 277 of file Modalias.cc.
RW_pointer<Impl> zypp::target::Modalias::_pimpl [private] |
Pointer to implementation.
Definition at line 79 of file Modalias.h.
Referenced by zypp::target::operator<<(), and query().