Corium 1.1.0
High-Performance Zero-Heap C++20 MPSC Application Runtime
Loading...
Searching...
No Matches
corium::fsm::Transition< From, Event, To, Guard, Action > Struct Template Reference

Compile-time transition rule definition. More...

#include <Transition.hpp>

+ Collaboration diagram for corium::fsm::Transition< From, Event, To, Guard, Action >:

Public Types

using ActionType = Action
 
using EventType = Event
 
using FromState = From
 
using GuardType = Guard
 
using ToState = To
 

Public Member Functions

constexpr Transition ()=default
 
constexpr Transition (GuardType g, ActionType a=ActionType{})
 

Public Attributes

ActionType action {}
 
GuardType guard {}
 

Static Public Attributes

static constexpr bool is_internal = false
 

Detailed Description

template<typename From, typename Event, typename To, typename Guard = Always, typename Action = NoAction>
struct corium::fsm::Transition< From, Event, To, Guard, Action >

Compile-time transition rule definition.

Template Parameters
FromSource state type.
EventTrigger event type.
ToDestination state type.
GuardCallable predicate (FromState&, const Event&) -> bool.
ActionCallable action (FromState&, const Event&, ToState&) -> void.

Member Typedef Documentation

◆ ActionType

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
using corium::fsm::Transition< From, Event, To, Guard, Action >::ActionType = Action

◆ EventType

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
using corium::fsm::Transition< From, Event, To, Guard, Action >::EventType = Event

◆ FromState

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
using corium::fsm::Transition< From, Event, To, Guard, Action >::FromState = From

◆ GuardType

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
using corium::fsm::Transition< From, Event, To, Guard, Action >::GuardType = Guard

◆ ToState

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
using corium::fsm::Transition< From, Event, To, Guard, Action >::ToState = To

Constructor & Destructor Documentation

◆ Transition() [1/2]

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
constexpr corium::fsm::Transition< From, Event, To, Guard, Action >::Transition ( )
constexprdefault

◆ Transition() [2/2]

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
constexpr corium::fsm::Transition< From, Event, To, Guard, Action >::Transition ( GuardType  g,
ActionType  a = ActionType{} 
)
inlineexplicitconstexpr

Member Data Documentation

◆ action

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
ActionType corium::fsm::Transition< From, Event, To, Guard, Action >::action {}

◆ guard

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
GuardType corium::fsm::Transition< From, Event, To, Guard, Action >::guard {}

◆ is_internal

template<typename From , typename Event , typename To , typename Guard = Always, typename Action = NoAction>
constexpr bool corium::fsm::Transition< From, Event, To, Guard, Action >::is_internal = false
staticconstexpr

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