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

Device id callif. More...

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

Public Member Functions

 CallIfDeviceId () noexcept
 Empty constructor. More...
 
 CallIfDeviceId (int32_t nDeviceId) noexcept
 Constructor that selects events with a specific device id. More...
 
bool operator() (const shared_ptr< const Event > &refEvent) const noexcept override
 Function that determines whether an event should be sent to a listener. More...
 
int32_t getDeviceId () const noexcept
 The device id to be selected. More...
 
- Public Member Functions inherited from stmi::CallIf
virtual ~CallIf () noexcept=default
 

Additional Inherited Members

- Protected Member Functions inherited from stmi::CallIf
 CallIf () noexcept
 

Detailed Description

Device id callif.

Selects events generated by a specific device instance identified by its id.

Constructor & Destructor Documentation

◆ CallIfDeviceId() [1/2]

stmi::CallIfDeviceId::CallIfDeviceId ( )
noexcept

Empty constructor.

Selects an event if device of its capability is not defined.

◆ CallIfDeviceId() [2/2]

stmi::CallIfDeviceId::CallIfDeviceId ( int32_t  nDeviceId)
explicitnoexcept

Constructor that selects events with a specific device id.

Parameters
nDeviceIdThe device id. Must be >=0.

Member Function Documentation

◆ getDeviceId()

int32_t stmi::CallIfDeviceId::getDeviceId ( ) const
inlinenoexcept

The device id to be selected.

Returns
The device id or -1.

◆ operator()()

bool stmi::CallIfDeviceId::operator() ( const shared_ptr< const Event > &  refEvent) const
inlineoverridevirtualnoexcept

Function that determines whether an event should be sent to a listener.

Parameters
refEventThe event. Cannot be null.
Returns
true if the event is to be sent to the listener, false otherwise.

Implements stmi::CallIf.