fsm
Public Types | Public Member Functions | List of all members
escad::state< SubStates > Struct Template Reference

Denotes a state. More...

#include <states.h>

Public Types

using substates_type = states< SubStates... >
 
using state_tag = void
 

Public Member Functions

template<class S >
auto transition () const
 Execute transition to another state. More...
 
auto not_handled () const
 Indicate that event was not handled. More...
 
auto handled () const
 Indicate that event was handled. More...
 

Detailed Description

template<class... SubStates>
struct escad::state< SubStates >

Denotes a state.

This is basic bulding block for a state machine. Each state must derive from this template to provide necessery definitions and helper functions.

If one or more SubStates is provided state machine will create a sub state machine. All events will be passed down to a sub state machine first.

Member Function Documentation

◆ handled()

template<class... SubStates>
auto escad::state< SubStates >::handled ( ) const
inline

Indicate that event was handled.

Event processing will stop. It is intended to be returned from state's event handler.

◆ not_handled()

template<class... SubStates>
auto escad::state< SubStates >::not_handled ( ) const
inline

Indicate that event was not handled.

If there's parent state machine the vent will be processed there. It is intended to be returned from state's event handler.

◆ transition()

template<class... SubStates>
template<class S >
auto escad::state< SubStates >::transition ( ) const
inline

Execute transition to another state.

It is intended to be returned from state's event handler.


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