libzypp 17.37.10

zypp::target::Modalias Class Reference

Hardware abstaction layer singleton. More...

`#include <zypp/target/modalias/Modalias.h>`

## Classes
struct | Impl
| Modalias implementation. More...

## Public Types
using | ModaliasList = std::vector<std::string>

## 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
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
bool | query (const std::string &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.
const ModaliasList & | modaliasList () const
| List of modaliases found on system.
void | modaliasList (ModaliasList newlist_r)
| Manually set list of modaliases to use.

## 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)

## Related Symbols
(Note that these are not member symbols.)
std::ostream & | operator<< (std::ostream &str, const Modalias::Impl &obj)
| Stream output And maybe std::ostream & operator<< Modalias::Impl below too.
std::ostream & | operator<< (std::ostream &str, const Modalias &obj) ZYPP_API_DEPTESTOMATIC
| Stream output.

## Detailed Description

Hardware abstaction layer singleton.

Definition at line 36 of file Modalias.h.

## Member Typedef Documentation

## ◆ ModaliasList

using zypp::target::Modalias::ModaliasList = std::vector<std::string>

Definition at line 45 of file Modalias.h.

## Constructor & Destructor Documentation

## ◆ ~Modalias()

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

Dtor.

Definition at line 220 of file Modalias.cc.

## ◆ Modalias()

zypp::target::Modalias::Modalias | ( |  | ) |
| private

Singleton ctor.

Definition at line 216 of file Modalias.cc.

## Member Function Documentation

## ◆ instance()

Modalias & zypp::target::Modalias::instance | ( |  | ) |
| static

Singleton access.

Definition at line 223 of file Modalias.cc.

## ◆ query() [1/3]

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 70 of file Modalias.h.

## ◆ query() [2/3]

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 229 of file Modalias.cc.

## ◆ query() [3/3]

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 75 of file Modalias.h.

## ◆ modaliasList() [1/2]

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

List of modaliases found on system.

Definition at line 232 of file Modalias.cc.

## ◆ modaliasList() [2/2]

void zypp::target::Modalias::modaliasList | ( | ModaliasList | newlist_r | ) |

Manually set list of modaliases to use.

Definition at line 235 of file Modalias.cc.

## Friends And Related Symbol Documentation

## ◆ operator<< [1/3]

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

Definition at line 238 of file Modalias.cc.

## ◆ operator<<() [2/3]

std::ostream & operator<< | ( | std::ostream & | str,
|  | const Modalias & | obj )
| related

Stream output.

Definition at line 238 of file Modalias.cc.

## Member Data Documentation

## ◆ _pimpl

RW_pointer<Impl> zypp::target::Modalias::_pimpl
| private

Pointer to implementation.

Definition at line 89 of file Modalias.h.

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

- zypp/target/modalias/Modalias.h
- zypp/target/modalias/Modalias.cc