-
-
Notifications
You must be signed in to change notification settings - Fork 5
Basic Context
Andrew Gresyk edited this page Apr 1, 2022
·
4 revisions
-
Context is a user-defined type, for sharing data between user scope, and state methods.
struct Context {}; using Config = ffsm2::Config::ContextT<Context&>; using M = ffsm2::MachineT<Config>;
-
Set context type (can be a value, a reference or a pointer):
using Config = ffsm2::Config ::ContextT<TContext>; using M = ffsm2::MachineT<Config>;
Method | Description |
---|---|
Instance(const Context&); |
Construct FSM instance with context |
Context& Instance::context(); const Context& Instance::context() const;
|
Access context |
void Instance::setContext(const Context&); |
Assign context |