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

Accessor callif. More...

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

Public Member Functions

 CallIfAccessor () noexcept
 Empty constructor. More...
 
 CallIfAccessor (const shared_ptr< const Accessor > &refAccessor) noexcept
 Constructor. More...
 
bool operator() (const shared_ptr< const Event > &refEvent) const noexcept override
 Event selection function. More...
 
const shared_ptr< const Accessor > & getAccessor () const noexcept
 The accessor 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

Accessor callif.

Selects events with the given accessor.

Constructor & Destructor Documentation

◆ CallIfAccessor() [1/2]

stmi::CallIfAccessor::CallIfAccessor ( )
noexcept

Empty constructor.

Selects events that didn't need an accessor to be generated.

◆ CallIfAccessor() [2/2]

stmi::CallIfAccessor::CallIfAccessor ( const shared_ptr< const Accessor > &  refAccessor)
explicitnoexcept

Constructor.

Selects events that needed the given accessor to be generated, if null same as empty constructor, otherwise instances of this class keep a strong reference to the accessor.

Parameters
refAccessorAccessor subclass instance or null.

Member Function Documentation

◆ getAccessor()

const shared_ptr<const Accessor>& stmi::CallIfAccessor::getAccessor ( ) const
inlinenoexcept

The accessor to be selected.

Returns
The accessor. Can be null.

◆ operator()()

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

Event selection function.

Note: if both this callif's accessor and the refAccessor are null, true is returned.

Implements stmi::CallIf.