|
stmm-input-doc
0.17.0
|
Device class template. More...

Public Member Functions | |
| std::string | getName () const noexcept override |
| shared_ptr< DeviceManager > | getDeviceManager () const noexcept override |
| The device manager that manages the device. More... | |
| shared_ptr< ODM > | getOwnerDeviceManager () const noexcept |
Public Member Functions inherited from stmi::Device | |
| virtual | ~Device () noexcept=default |
| int32_t | getId () const noexcept |
| The device id. More... | |
| template<typename TCapa > | |
| bool | getCapability (shared_ptr< TCapa > &refCapa) const noexcept |
| Request a registered capability from this device. More... | |
| virtual shared_ptr< Capability > | getCapability (const Capability::Class &oClass) const noexcept=0 |
| Requests the instance of a capability class. More... | |
| virtual shared_ptr< Capability > | getCapability (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::Class > | getCapabilityClasses () const noexcept=0 |
| The capability classes supported by this device. More... | |
Protected Member Functions | |
| BasicDevice (std::string sName, const shared_ptr< ODM > &refOwnerDeviceManager) noexcept | |
| Device template constructor. More... | |
| void | resetOwnerDeviceManager () noexcept |
| Resets the link to the owner device manager. More... | |
Protected Member Functions inherited from stmi::Device | |
| Device () noexcept | |
Device class template.
Helper class that Device classes can subclass. It stores name and owner device manager. ODM = Owner DeviceManager, must be subclass of ChildDeviceManager.
|
inlineprotectednoexcept |
Device template constructor.
The instances of this class keep a weak reference to their owner ChildDeviceManager to avoid memory leaks.
| sName | The name of the device. Cannot be empty. |
| refOwnerDeviceManager | The ChildDeviceManager subclass. Cannot be null. |
|
overridevirtualnoexcept |
The device manager that manages the device.
As a convention Device instances should hold a weak_ptr to their manager to avoid reference cycles.
Implements stmi::Device.
|
inlineoverridevirtualnoexcept |
Implements stmi::Device.
|
inlinenoexcept |
|
inlineprotectednoexcept |
Resets the link to the owner device manager.
When a device is removed from a device manager this function should be called.
1.8.13