fsm 0.4.1
Header-only C++20 hierarchical table-driven FSM
Loading...
Searching...
No Matches
fsm::result< State, Event, Reason > Struct Template Reference

Dispatch verdict: what happened, where, and why. More...

#include <fsm.hpp>

Public Attributes

fsm::status status
 Verdict category.
 
State from
 Leaf state before dispatch.
 
State to
 Leaf state after dispatch (== from unless transitioned).
 
Event event
 The dispatched event.
 
uint16_t row
 Deciding (or first-matching) row index; fsm::no_row if none.
 
Reason reason
 Refusal reason for refused_by_row; Reason{} otherwise.
 

Detailed Description

template<class State, class Event, class Reason>
struct fsm::result< State, Event, Reason >

Dispatch verdict: what happened, where, and why.

A C-shaped POD so extern-"C" facades can mirror it field for field.

Template Parameters
Statethe machine's state enum
Eventthe machine's event enum
Reasonuser refusal-reason type (meaningful for refused_by_row)

Member Data Documentation

◆ event

template<class State , class Event , class Reason >
Event fsm::result< State, Event, Reason >::event

The dispatched event.

◆ from

template<class State , class Event , class Reason >
State fsm::result< State, Event, Reason >::from

Leaf state before dispatch.

◆ reason

template<class State , class Event , class Reason >
Reason fsm::result< State, Event, Reason >::reason

Refusal reason for refused_by_row; Reason{} otherwise.

◆ row

template<class State , class Event , class Reason >
uint16_t fsm::result< State, Event, Reason >::row

Deciding (or first-matching) row index; fsm::no_row if none.

◆ status

template<class State , class Event , class Reason >
fsm::status fsm::result< State, Event, Reason >::status

Verdict category.

◆ to

template<class State , class Event , class Reason >
State fsm::result< State, Event, Reason >::to

Leaf state after dispatch (== from unless transitioned).


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