|
stmm-games-doc
0.32.0
|
Fake device template that implements one capability class. More...

Public Member Functions | |
| FakeDevice (const shared_ptr< DeviceManager > &refDeviceManager, const std::string &sName, const shared_ptr< CAPA > &refCapability) noexcept | |
| Constructor. More... | |
| std::string | getName () const noexcept override |
| shared_ptr< DeviceManager > | getDeviceManager () const noexcept override |
| The device manager that manages the device. More... | |
| shared_ptr< Capability > | getCapability (const Capability::Class &oClass) const noexcept override |
| Requests the instance of a capability class. More... | |
| std::vector< Capability::Class > | getCapabilityClasses () const noexcept override |
| The capability classes supported by this device. More... | |
| shared_ptr< Capability > | getCapability (int32_t nCapabilityId) const noexcept override |
| Returns the capability with the given id, or null if not found. More... | |
| std::vector< int32_t > | getCapabilities () const noexcept override |
| Returns the ids of all the device's capabilities. More... | |
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... | |
Additional Inherited Members | |
Protected Member Functions inherited from stmi::Device | |
| Device () noexcept | |
Fake device template that implements one capability class.
|
inlinenoexcept |
Constructor.
If the name is empty one is automatically created. Instances should be created with std::make_shared().
| refDeviceManager | The device manager. Can be null. |
| sName | The name of the device. Can be empty. |
| refCapability | The capability instance of the device. Cannot be null. |
|
inlineoverridevirtualnoexcept |
Returns the ids of all the device's capabilities.
Implements stmi::Device.
|
inlineoverridevirtualnoexcept |
Requests the instance of a capability class.
If the device doesn't have the capability null is returned.
| oClass | The requested registered class. |
Implements stmi::Device.
|
inlineoverridevirtualnoexcept |
Returns the capability with the given id, or null if not found.
Implements stmi::Device.
|
inlineoverridevirtualnoexcept |
The capability classes supported by this device.
Implements stmi::Device.
|
inlineoverridevirtualnoexcept |
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.
1.8.13