xronos-sdk 0.2.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 this reaction may write to. More...
 

Public Member Functions

virtual ~BaseReaction ()=default
 Correct deletion of an instance of a derived class is permitted.
 

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.
 

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: