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

Defines a child device manager. More...

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

Public Member Functions

shared_ptr< ParentDeviceManagergetParent () const noexcept
 Gets the parent of this child device manager. More...
 
shared_ptr< ParentDeviceManagergetParent () noexcept
 Gets the parent of this child device manager. More...
 
shared_ptr< ParentDeviceManagergetRoot () const noexcept
 Returns the root device manager. More...
 
shared_ptr< ParentDeviceManagergetRoot () noexcept
 Returns the root device manager. More...
 
bool isParent () const noexcept
 Tells whether this instance is also a ParentDeviceManager. More...
 
shared_ptr< ParentDeviceManagergetAsParent () const noexcept
 If a parent returns this object as a parent. More...
 
shared_ptr< ParentDeviceManagergetAsParent () noexcept
 If a parent returns this object as a parent. More...
 
- Public Member Functions inherited from stmi::DeviceManager
virtual ~DeviceManager () noexcept=default
 
virtual shared_ptr< DevicegetDevice (int32_t nDeviceId) const noexcept=0
 Returns the device with the given id, or null if not found. More...
 
virtual std::vector< Capability::ClassgetCapabilityClasses () const noexcept=0
 The registered capability classes of the device manager. More...
 
virtual std::vector< Capability::ClassgetDeviceCapabilityClasses () const noexcept=0
 The registered capability classes of the device manager's devices. More...
 
template<typename TCapa >
bool getCapability (shared_ptr< TCapa > &refCapa) const noexcept
 Request a registered device manager capability. 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 device manager's capability with the given id, or null if not found. More...
 
virtual std::vector< Event::ClassgetEventClasses () const noexcept=0
 The registered event classes the device manager and all its devices can send. More...
 
virtual std::vector< int32_t > getDevicesWithCapabilityClass (const Capability::Class &oCapabilityClass) const noexcept=0
 Returns the ids of the devices that have the given capability class. More...
 
virtual std::vector< int32_t > getDevices () const noexcept=0
 Returns the ids of all the device manager's devices. More...
 
virtual bool isEventClassEnabled (const Event::Class &oEventClass) const noexcept=0
 Tells whether an event class is enabled. More...
 
virtual void enableEventClass (const Event::Class &oEventClass) noexcept=0
 Enables an event class. More...
 
virtual bool addAccessor (const shared_ptr< Accessor > &refAccessor) noexcept=0
 Adds an accessor to the device manager. More...
 
virtual bool removeAccessor (const shared_ptr< Accessor > &refAccessor) noexcept=0
 Removes an accessor from the device manager. More...
 
virtual bool hasAccessor (const shared_ptr< Accessor > &refAccessor) noexcept=0
 Tells whether the device manager has a given accessor. More...
 
virtual bool addEventListener (const shared_ptr< EventListener > &refEventListener, const shared_ptr< CallIf > &refCallIf) noexcept=0
 Adds an event listener with its callif condition to the device manager. More...
 
virtual bool addEventListener (const shared_ptr< EventListener > &refEventListener) noexcept=0
 Adds an event listener to the device manager. More...
 
virtual bool removeEventListener (const shared_ptr< EventListener > &refEventListener, bool bFinalize) noexcept=0
 Removes an event listener from the device manager. More...
 
virtual bool removeEventListener (const shared_ptr< EventListener > &refEventListener) noexcept=0
 Removes an event listener from the device manager. More...
 

Protected Member Functions

 ChildDeviceManager () noexcept
 Constructor. More...
 
- Protected Member Functions inherited from stmi::DeviceManager
 DeviceManager () noexcept
 

Additional Inherited Members

- Static Public Member Functions inherited from stmi::DeviceManager
static int64_t getNowTimeMicroseconds () noexcept
 Current time from epoch in microseconds. More...
 

Detailed Description

Defines a child device manager.

This allows a device manager to be combined with other device managers in a tree-like structure to form a bigger one. Subclasses of this class can be added to a ParentDeviceManager.

Constructor & Destructor Documentation

◆ ChildDeviceManager()

stmi::ChildDeviceManager::ChildDeviceManager ( )
protectednoexcept

Constructor.

Member Function Documentation

◆ getAsParent() [1/2]

shared_ptr<ParentDeviceManager> stmi::ChildDeviceManager::getAsParent ( ) const
noexcept

If a parent returns this object as a parent.

Returns
This object as ParentDeviceManager or null if not a parent.

◆ getAsParent() [2/2]

shared_ptr<ParentDeviceManager> stmi::ChildDeviceManager::getAsParent ( )
noexcept

If a parent returns this object as a parent.

Returns
This object as ParentDeviceManager or null if not a parent.

◆ getParent() [1/2]

shared_ptr<ParentDeviceManager> stmi::ChildDeviceManager::getParent ( ) const
noexcept

Gets the parent of this child device manager.

If it has no parent returns null, in which case getRoot() returns this instance.

◆ getParent() [2/2]

shared_ptr<ParentDeviceManager> stmi::ChildDeviceManager::getParent ( )
noexcept

Gets the parent of this child device manager.

If it has no parent returns null, in which case getRoot() returns this instance.

◆ getRoot() [1/2]

shared_ptr<ParentDeviceManager> stmi::ChildDeviceManager::getRoot ( ) const
noexcept

Returns the root device manager.

Returns the root device manager of tree-like structure this device manager is in.

Returns
The root. Cannot be null.

◆ getRoot() [2/2]

shared_ptr<ParentDeviceManager> stmi::ChildDeviceManager::getRoot ( )
noexcept

Returns the root device manager.

Returns the root device manager of tree-like structure this device manager is in.

Returns
The root. Cannot be null.

◆ isParent()

bool stmi::ChildDeviceManager::isParent ( ) const
inlinenoexcept

Tells whether this instance is also a ParentDeviceManager.

Returns
Whether a ParentDeviceManager.