xronos-sdk 0.4.0
Xronos C++ SDK
 
Loading...
Searching...
No Matches
xronos::sdk::BaseReaction Class Referenceabstract

Non-template base class for reactions. More...

#include <xronos/sdk/reaction.hh>

Inheritance diagram for xronos::sdk::BaseReaction:
[legend]

Classes

class  MetricEffect
 Access to a metric that can be recorded. More...
 
class  PortEffect
 Access to a port that this reaction may write to. More...
 
class  ProgrammableTimerEffect
 Access to a programmable timer that this reaction may schedule events with. More...
 
class  Trigger
 Access to a reactor element that triggers the reaction and that it may read. More...
 

Protected Member Functions

auto context () noexcept -> ReactionContext
 Get the context object that is needed to construct the reaction's members.
 

Private Member Functions

virtual void handler ()=0
 The body of the reaction.
 

Additional Inherited Members

- Public Member Functions inherited from xronos::sdk::Element
auto name () const noexcept -> const std::string &
 The name of the current element.
 
auto fqn () const noexcept -> const std::string &
 The fully qualified name of the current element.
 
virtual ~Element ()=default
 Virtual destructor.
 

Detailed Description

Non-template base class for reactions.

Application code should inherit from Reaction instead of directly from BaseReaction.

Member Function Documentation

◆ context()

auto xronos::sdk::BaseReaction::context ( ) -> ReactionContext
nodiscardprotectednoexcept

Get the context object that is needed to construct the reaction's members.

Returns
ReactionContext This reaction's initialization context.

◆ handler()

virtual void xronos::sdk::BaseReaction::handler ( )
privatepure virtual

The body of the reaction.

This method should be overridden by application code to provide the functionality of the reaction. This handler will be called by the framework when the reaction is triggered.


The documentation for this class was generated from the following file: