zypp::target::Modalias Class Reference

Hardware abstaction layer singleton. More...

#include <Modalias.h>

List of all members.

Public Types

typedef std::vector< std::string > ModaliasList

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
const ModaliasListmodaliasList () const
 List of modaliases found on system.

Static Public Member Functions

static Modaliasinstance ()
 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)

Classes

struct  Impl
 Modalias implementation. More...


Detailed Description

Hardware abstaction layer singleton.

Definition at line 35 of file Modalias.h.


Member Typedef Documentation

typedef std::vector<std::string> zypp::target::Modalias::ModaliasList

Definition at line 41 of file Modalias.h.


Constructor & Destructor Documentation

zypp::target::Modalias::~Modalias (  ) 

Dtor.

Definition at line 173 of file Modalias.cc.

zypp::target::Modalias::Modalias (  )  [private]

Singleton ctor.

Definition at line 169 of file Modalias.cc.


Member Function Documentation

Modalias & zypp::target::Modalias::instance (  )  [static]

Singleton access.

Definition at line 176 of file Modalias.cc.

Referenced by zypp::solver::detail::Testcase::createTestcase().

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
the following query will return true:
   modalias_matches("pci:v00008086d0000265Asv*sd*bc*sc*i*")

Definition at line 69 of file Modalias.h.

References zypp::IdString::c_str().

Referenced by query().

bool zypp::target::Modalias::query ( const char *  cap_r  )  const

Definition at line 182 of file Modalias.cc.

References _pimpl.

bool zypp::target::Modalias::query ( const std::string &  cap_r  )  const [inline]

Definition at line 74 of file Modalias.h.

References query().

const Modalias::ModaliasList & zypp::target::Modalias::modaliasList (  )  const

List of modaliases found on system.

Definition at line 185 of file Modalias.cc.

References _pimpl.


Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const Modalias obj 
) [friend]

Stream output

Definition at line 188 of file Modalias.cc.


Member Data Documentation

Pointer to implementation.

Definition at line 85 of file Modalias.h.

Referenced by modaliasList(), zypp::target::operator<<(), and query().


The documentation for this class was generated from the following files:

Generated on Tue May 5 14:49:54 2015 for libzypp by  doxygen 1.5.6