-
-
Notifications
You must be signed in to change notification settings - Fork 5
Advanced Transition Payloads
Andrew Gresyk edited this page Apr 1, 2022
·
4 revisions
-
Transitions can have payloads.
-
Only one payload type can be set for the entire FSM instance.
-
Payload versions of transition methods accept either const or rvalue references.
-
Set payload type:
using Config = ffsm2::Config ::PayloadT<T>; using M = ffsm2::MachineT<Config>;
Method | Description |
---|---|
void Plan::changeWith(const StateID, const Payload&); void Plan::changeWith<TOrigin>(const Payload&);
|
Default transition with const payload
|
void Plan::changeWith(const StateID, Payload&&); void Plan::changeWith<TOrigin>(Payload&&);
|
Default transition with moved payload |