stmm-games-doc  0.32.0
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
stmi::DeviceMgmtCapability Class Referenceabstract

Device manager's capability for tree like composed device managers. More...

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

Public Member Functions

virtual shared_ptr< DeviceManagergetRootDeviceManager () const noexcept=0
 The root device manager. More...
 
- Public Member Functions inherited from stmi::DeviceManagerCapability
shared_ptr< DevicegetDevice () const noexcept override
 Returns null. More...
 
virtual shared_ptr< DeviceManagergetDeviceManager () const noexcept=0
 Returns the device manager owning this capability, if any. More...
 
- Public Member Functions inherited from stmi::Capability
virtual ~Capability () noexcept=default
 
int32_t getId () const noexcept
 The capability id. More...
 
const ClassgetCapabilityClass () const noexcept
 Get the registered class of the capability instance. More...
 

Static Public Member Functions

static const Capability::ClassgetClass () noexcept
 
- Static Public Member Functions inherited from stmi::Capability
static bool isCapabilityClassIdRegistered (const std::string &sCapabilityClassId) noexcept
 Tells whether the given capability class id is registered. More...
 
static Class getCapabilityClassIdClass (const std::string &sCapabilityClassId) noexcept
 Gets the class with given class id. More...
 

Static Public Attributes

static const char *const s_sClassId
 

Protected Member Functions

 DeviceMgmtCapability () noexcept
 
- Protected Member Functions inherited from stmi::DeviceManagerCapability
 DeviceManagerCapability (const Class &oClass) noexcept
 
- Protected Member Functions inherited from stmi::Capability
 Capability (const Class &oClass) noexcept
 Constructor to be called from subclasses. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from stmi::Capability
static bool isCapabilityTypeRegistered (const std::type_info &oCapabilityType) noexcept
 Tells whether a capability type was registered. More...
 
static const std::type_info & getCapabilityClassIdType (const std::string &sCapabilityClassId, bool &bRegistered) noexcept
 Gets the type of the registered capability subclass associated with class id. More...
 
static std::string getCapabilityTypeClassId (const std::type_info &oType) noexcept
 Gets the class id of the given type. More...
 

Detailed Description

Device manager's capability for tree like composed device managers.

The capabilities of leaf device managers might not be directly accessible. This device manager capability allows to retrieve other capabilities from inner and leaf node device managers. An example could be a ServerCapability which allows to start, stop the server or request status information.

This capability is also used by DeviceMgmtEvent to inform listeners of added, removed and changed devices.

Constructor & Destructor Documentation

◆ DeviceMgmtCapability()

stmi::DeviceMgmtCapability::DeviceMgmtCapability ( )
protectednoexcept

Member Function Documentation

◆ getClass()

static const Capability::Class& stmi::DeviceMgmtCapability::getClass ( )
inlinestaticnoexcept

◆ getRootDeviceManager()

virtual shared_ptr<DeviceManager> stmi::DeviceMgmtCapability::getRootDeviceManager ( ) const
pure virtualnoexcept

The root device manager.

If the owner device manager of this capability is an inner node of a tree like structure of device managers the root of it is returned otherwise the same as DeviceManagerCapability::getDeviceManager() is returned.

DeviceManagerCapability::getDeviceManager() of an instance of this class should return the device manager owning the device involved in the DeviceMgmtEvent, which usually is a leaf in a tree like structure of device managers.

Returns
The root device manager. Cannot be null.

Member Data Documentation

◆ s_sClassId

const char* const stmi::DeviceMgmtCapability::s_sClassId
static