stmm-input-doc  0.17.0
Public Member Functions | Protected Member Functions | List of all members
stmi::Device Class Referenceabstract

Device base class. More...

Inheritance diagram for stmi::Device:
Inheritance graph
[legend]

Public Member Functions

virtual ~Device () noexcept=default
 
int32_t getId () const noexcept
 The device id. More...
 
virtual std::string getName () const noexcept=0
 
virtual shared_ptr< DeviceManagergetDeviceManager () const noexcept=0
 The device manager that manages the device. More...
 
template<typename TCapa >
bool getCapability (shared_ptr< TCapa > &refCapa) const noexcept
 Request a registered capability from this device. More...
 
virtual shared_ptr< CapabilitygetCapability (const Capability::Class &oClass) const noexcept=0
 Requests the instance of a capability class. More...
 
virtual shared_ptr< CapabilitygetCapability (int32_t nCapabilityId) const noexcept=0
 Returns the capability with the given id, or null if not found. More...
 
virtual std::vector< int32_t > getCapabilities () const noexcept=0
 Returns the ids of all the device's capabilities. More...
 
virtual std::vector< Capability::ClassgetCapabilityClasses () const noexcept=0
 The capability classes supported by this device. More...
 

Protected Member Functions

 Device () noexcept
 

Detailed Description

Device base class.

Constructor & Destructor Documentation

◆ ~Device()

virtual stmi::Device::~Device ( )
virtualdefaultnoexcept

◆ Device()

stmi::Device::Device ( )
protectednoexcept

Member Function Documentation

◆ getCapabilities()

virtual std::vector<int32_t> stmi::Device::getCapabilities ( ) const
pure virtualnoexcept

◆ getCapability() [1/3]

template<typename TCapa >
bool stmi::Device::getCapability ( shared_ptr< TCapa > &  refCapa) const
inlinenoexcept

Request a registered capability from this device.

Parameters
refCapa[out] The registered Capability subclass or null if not supported by device.
Returns
Whether the device has the requested capability.

◆ getCapability() [2/3]

virtual shared_ptr<Capability> stmi::Device::getCapability ( const Capability::Class oClass) const
pure virtualnoexcept

◆ getCapability() [3/3]

virtual shared_ptr<Capability> stmi::Device::getCapability ( int32_t  nCapabilityId) const
pure virtualnoexcept

◆ getCapabilityClasses()

virtual std::vector<Capability::Class> stmi::Device::getCapabilityClasses ( ) const
pure virtualnoexcept

◆ getDeviceManager()

virtual shared_ptr<DeviceManager> stmi::Device::getDeviceManager ( ) const
pure virtualnoexcept

◆ getId()

int32_t stmi::Device::getId ( ) const
inlinenoexcept

The device id.

Returns
The unique id of the device.

◆ getName()

virtual std::string stmi::Device::getName ( ) const
pure virtualnoexcept