sim: Add serialization macros for std containers
authorAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 7 Jul 2015 08:51:03 +0000 (09:51 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 7 Jul 2015 08:51:03 +0000 (09:51 +0100)
src/sim/serialize.hh

index 888dba6149258c8ad793a734015f20cad98d2b6b..2fb7cddd03f7657bbf03607a189651920835da26 100644 (file)
@@ -160,6 +160,12 @@ void fromSimObject(T &t, SimObject *s)
 #define UNSERIALIZE_ARRAY(member, size)         \
         arrayParamIn(cp, section, #member, member, size)
 
+#define SERIALIZE_CONTAINER(member)             \
+        arrayParamOut(os, #member, member)
+
+#define UNSERIALIZE_CONTAINER(member)           \
+        arrayParamIn(cp, section, #member, member)
+
 #define SERIALIZE_OBJPTR(objptr)        paramOut(os, #objptr, (objptr)->name())
 
 #define UNSERIALIZE_OBJPTR(objptr)                      \