fsm
Public Types | Public Member Functions | List of all members
escad::access_context< C > Struct Template Referencefinal

Brings the context into the State automatically. More...

#include <access_context.h>

Public Types

using access_context_type = C
 

Public Member Functions

 access_context (C &c) noexcept
 
template<class U , class = std::enable_if_t<U::template has<C>>>
 access_context (U &tuple_like) noexcept
 
C & get_context () noexcept
 Retrieve a context. More...
 
C const & get_context () const noexcept
 

Detailed Description

template<class C>
struct escad::access_context< C >

Brings the context into the State automatically.

Member Function Documentation

◆ get_context()

template<class C >
C& escad::access_context< C >::get_context ( )
inlinenoexcept

Retrieve a context.

Warning
Calling this method in constructor is undefined behavior (crash in practice). If you need to access the Context in the constructor, get it via State's ctor parameter.

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