-
-
Notifications
You must be signed in to change notification settings - Fork 65
Advanced Serialization
Andrew Gresyk edited this page Apr 2, 2022
·
2 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 HFSM2_ENABLE_SERIALIZATION #include <hfsm2/machine.hpp>
Method | Description |
---|---|
void Instance::save(SerialBuffer& buffer) const; |
Store instance state |
void Instance::load(const SerialBuffer& buffer); |
Restore instance state |
Method | Description |
---|---|
void SerialBuffer::clear(); |
Clear buffer |
Data& SerialBuffer::data(); const Data& SerialBuffer::data() const;
|
Data access |