stmm-games-doc  0.32.0
Public Member Functions | List of all members
stmi::CallIfCapabilityId Class Reference

Capability id callif. More...

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

Public Member Functions

 CallIfCapabilityId (int32_t nCapabilityId) noexcept
 Constructor. 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 getCapabilityId () const noexcept
 The capability 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

Capability id callif.

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

Constructor & Destructor Documentation

◆ CallIfCapabilityId()

stmi::CallIfCapabilityId::CallIfCapabilityId ( int32_t  nCapabilityId)
explicitnoexcept

Constructor.

Selects events with a specific capability id.

Parameters
nCapabilityIdThe capability id. Must be >=0.

Member Function Documentation

◆ getCapabilityId()

int32_t stmi::CallIfCapabilityId::getCapabilityId ( ) const
inlinenoexcept

The capability id to be selected.

Returns
The capability id. Always >= 0.

◆ operator()()

bool stmi::CallIfCapabilityId::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.