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

The keys capability of a device. More...

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

Public Member Functions

virtual bool isKeyboard () const noexcept=0
 Tells whether the keys supported by the device are enough to consider the device a keyboard. More...
 
- Public Member Functions inherited from stmi::Capability
virtual ~Capability () noexcept=default
 
int32_t getId () const noexcept
 The capability id. More...
 
virtual shared_ptr< DevicegetDevice () const noexcept=0
 Returns the device owning this capability, if any. 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

 KeyCapability () 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

The keys capability of a device.

Devices with this capability can generate keyboard events.

Constructor & Destructor Documentation

◆ KeyCapability()

stmi::KeyCapability::KeyCapability ( )
inlineprotectednoexcept

Member Function Documentation

◆ getClass()

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

◆ isKeyboard()

virtual bool stmi::KeyCapability::isKeyboard ( ) const
pure virtualnoexcept

Tells whether the keys supported by the device are enough to consider the device a keyboard.

Implemented in stmi::testing::FakeKeyCapability.

Member Data Documentation

◆ s_sClassId

const char* const stmi::KeyCapability::s_sClassId
static