-
-
Notifications
You must be signed in to change notification settings - Fork 5
Advanced Serialization
Andrew Gresyk edited this page Mar 31, 2022
·
3 revisions
-
FSM instance can be stored to
char
buffer and restored from it. -
Serialization can be used for saving FSM to file or network replication.
-
Enable serialization support
#define FFSM2_ENABLE_SERIALIZATION #include <ffsm2/machine.hpp>
void |
Instance::save(SerialBuffer& buffer) const; |
Store instance state |
void |
Instance::load(const SerialBuffer& buffer); |
Restore instance state |
void |
SerialBuffer::clear(); |
Clear buffer | ||
const
|
Data& Data&
|
SerialBuffer::data(); SerialBuffer::data()
|
const;
|
Data access |