sim: Add macros to serialize objects into a section
Add the SERIALIZE_OBJ / UNSERIALIZE_OBJ macros that serialize an object into a subsection of the current checkpoint section.
This commit is contained in:
parent
b3ecfa6ae0
commit
7773cb9565
1 changed files with 2 additions and 0 deletions
|
@ -186,6 +186,8 @@ void fromSimObject(T &t, SimObject *s)
|
|||
eventQueue()->checkpointReschedule(&event); \
|
||||
} while(0)
|
||||
|
||||
#define SERIALIZE_OBJ(obj) obj.serializeSection(cp, #obj)
|
||||
#define UNSERIALIZE_OBJ(obj) obj.unserializeSection(cp, #obj)
|
||||
|
||||
#define SERIALIZE_OBJPTR(objptr) paramOut(cp, #objptr, (objptr)->name())
|
||||
|
||||
|
|
Loading…
Reference in a new issue