stmm-input-doc  0.17.0
Public Member Functions | List of all members
stmi::Capability::Class Class Referencefinal

The representation of a registered capability class. More...

Public Member Functions

 Class () noexcept
 Constructs an empty capability class instance. More...
 
 Class (const std::type_info &oCapabilityType) noexcept
 Constructs an capability class instance. More...
 
bool operator== (const std::type_info &oOtherCapabilityType) const noexcept
 Compares a registered capability class instance with a c++ typeid. More...
 
bool operator!= (const std::type_info &oOtherCapabilityType) const noexcept
 
bool operator== (const Class &oOther) const noexcept
 Compares a registered capability class to another. More...
 
bool operator!= (const Class &oOther) const noexcept
 
 operator bool () const noexcept
 Tells whether class is registered. More...
 
const std::type_info & getTypeInfo () const noexcept
 The underlying c++ typeid of the class. More...
 
std::string getId () const noexcept
 The class id. More...
 
bool isDeviceManagerCapability () const noexcept
 Tells whether you can statically cast an instance of this Class to DeviceManagerCapability. More...
 

Detailed Description

The representation of a registered capability class.

Constructor & Destructor Documentation

◆ Class() [1/2]

stmi::Capability::Class::Class ( )
inlinenoexcept

Constructs an empty capability class instance.

◆ Class() [2/2]

stmi::Capability::Class::Class ( const std::type_info &  oCapabilityType)
inlineexplicitnoexcept

Constructs an capability class instance.

If the passed c++ typeid is not of a registered class an empty class is constructed.

Parameters
oCapabilityTypeunderlying c++ typeid of the class.

Member Function Documentation

◆ getId()

std::string stmi::Capability::Class::getId ( ) const
inlinenoexcept

The class id.

If the class is empty returns empty string.

Returns
The class id.

◆ getTypeInfo()

const std::type_info& stmi::Capability::Class::getTypeInfo ( ) const
inlinenoexcept

The underlying c++ typeid of the class.

Returns
The c++ type or if class is empty an invalid value.
See also
operator bool() const

◆ isDeviceManagerCapability()

bool stmi::Capability::Class::isDeviceManagerCapability ( ) const
inlinenoexcept

Tells whether you can statically cast an instance of this Class to DeviceManagerCapability.

See also
class DeviceManagerCapability
Returns
Whether this registered class is subclass of DeviceManagerCapability.

◆ operator bool()

stmi::Capability::Class::operator bool ( ) const
inlinenoexcept

Tells whether class is registered.

Returns
Whether class is not empty.

◆ operator!=() [1/2]

bool stmi::Capability::Class::operator!= ( const std::type_info &  oOtherCapabilityType) const
inlinenoexcept
See also
operator==(const std::type_info&)

◆ operator!=() [2/2]

bool stmi::Capability::Class::operator!= ( const Class oOther) const
inlinenoexcept
See also
operator==(const Class&)

◆ operator==() [1/2]

bool stmi::Capability::Class::operator== ( const std::type_info &  oOtherCapabilityType) const
inlinenoexcept

Compares a registered capability class instance with a c++ typeid.

If the class instance is empty false is returned.

Parameters
oOtherCapabilityTypeThe c++ typeid.
Returns
The result of the comparison.

◆ operator==() [2/2]

bool stmi::Capability::Class::operator== ( const Class oOther) const
inlinenoexcept

Compares a registered capability class to another.

If both are empty true is returned.

Parameters
oOtherThe other class instance. Might be empty.
Returns
The result of the comparison.