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

Capability class callif. More...

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

Public Member Functions

 CallIfCapabilityClass (const Capability::Class &oClass) noexcept
 Constructor. More...
 
 CallIfCapabilityClass (const std::type_info &oCapabilityType) noexcept
 Type id constructor. More...
 
 CallIfCapabilityClass (const std::string &sCapabilityClassId) noexcept
 String id 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...
 
const Capability::ClassgetCapabilityClass () const noexcept
 The registered capability class 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 class callif.

Selects events generated by the instances of a specific registered capability class.

Constructor & Destructor Documentation

◆ CallIfCapabilityClass() [1/3]

stmi::CallIfCapabilityClass::CallIfCapabilityClass ( const Capability::Class oClass)
explicitnoexcept

Constructor.

Parameters
oClassThe capability class. Must be registered.

◆ CallIfCapabilityClass() [2/3]

stmi::CallIfCapabilityClass::CallIfCapabilityClass ( const std::type_info &  oCapabilityType)
explicitnoexcept

Type id constructor.

Parameters
oCapabilityTypeThe capability class by typeid. Must be registered.

◆ CallIfCapabilityClass() [3/3]

stmi::CallIfCapabilityClass::CallIfCapabilityClass ( const std::string &  sCapabilityClassId)
explicitnoexcept

String id Constructor.

Parameters
sCapabilityClassIdThe registered capability class string id. Cannot be null.

Member Function Documentation

◆ getCapabilityClass()

const Capability::Class& stmi::CallIfCapabilityClass::getCapabilityClass ( ) const
inlinenoexcept

The registered capability class to be selected.

◆ operator()()

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