From 7773cb9565a64bbd39db64e601a447eb4682d668 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Tue, 7 Jul 2015 09:51:04 +0100 Subject: [PATCH] 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. --- src/sim/serialize.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh index a0d4bafe7..ea2bd2928 100644 --- a/src/sim/serialize.hh +++ b/src/sim/serialize.hh @@ -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()) -- 2.30.2