xronos-sdk 0.2.0
Xronos C++ SDK
 
Loading...
Searching...
No Matches
xronos::sdk::Reaction< R > Class Template Reference

Reaction base class that is intended to be inherited by application code. More...

#include <xronos/sdk/reaction.hh>

Inheritance diagram for xronos::sdk::Reaction< R >:
[legend]

Protected Member Functions

auto self () noexcept -> R &
 Get a reference to the reaction's containing reactor.
 
- Protected Member Functions inherited from xronos::sdk::BaseReaction
auto context () noexcept -> ReactionContext
 Get the context object that is needed to construct the reaction's members.
 

Additional Inherited Members

- Public Member Functions inherited from xronos::sdk::BaseReaction
virtual ~BaseReaction ()=default
 Correct deletion of an instance of a derived class is permitted.
 

Detailed Description

template<class R>
class xronos::sdk::Reaction< R >

Reaction base class that is intended to be inherited by application code.

Implementors should provide reaction functionality by overriding the BaseReaction::handler method and should declare the triggers, sources, and effects that the reaction depends on as members of the derived class.

Member Function Documentation

◆ self()

template<class R>
auto xronos::sdk::Reaction< R >::self ( ) -> R&
nodiscardprotectednoexcept

Get a reference to the reaction's containing reactor.

This reference is valid at reaction construction time.

Returns
R& A reference to the reaction's containing reactor.

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