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

Parent link — a mandatory column: fsm::root or fsm::child_of(P). More...

#include <fsm.hpp>

Public Member Functions

constexpr parent_spec ()=default
 
constexpr parent_spec (root_t)
 
constexpr parent_spec (parent_kind kk, State st)
 

Public Attributes

parent_kind k = parent_kind::unspecified
 
State s {}
 

Detailed Description

template<class State>
struct fsm::parent_spec< State >

Parent link — a mandatory column: fsm::root or fsm::child_of(P).

Default-constructs to a poison unspecified value so an omitted .parent designated initializer is a compile error rather than a silently flattened hierarchy (a state accidentally outside its composite changes bubbling and fsm::any reach with no other diagnostic — forests are legal, so no validator could otherwise object).

Constructor & Destructor Documentation

◆ parent_spec() [1/3]

template<class State >
constexpr fsm::parent_spec< State >::parent_spec ( )
constexprdefault

◆ parent_spec() [2/3]

template<class State >
constexpr fsm::parent_spec< State >::parent_spec ( root_t  )
inlineconstexpr

◆ parent_spec() [3/3]

template<class State >
constexpr fsm::parent_spec< State >::parent_spec ( parent_kind  kk,
State  st 
)
inlineconstexpr

Member Data Documentation

◆ k

template<class State >
parent_kind fsm::parent_spec< State >::k = parent_kind::unspecified

◆ s

template<class State >
State fsm::parent_spec< State >::s {}

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