summaryrefslogtreecommitdiff
path: root/src/sim/serialize.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/serialize.hh')
-rw-r--r--src/sim/serialize.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sim/serialize.hh b/src/sim/serialize.hh
index 08240c0c0..cf1a672be 100644
--- a/src/sim/serialize.hh
+++ b/src/sim/serialize.hh
@@ -58,6 +58,10 @@ void paramIn(Checkpoint *cp, const std::string &section,
const std::string &name, T &param);
template <class T>
+bool optParamIn(Checkpoint *cp, const std::string &section,
+ const std::string &name, T &param);
+
+template <class T>
void arrayParamOut(std::ostream &os, const std::string &name,
const T *param, unsigned size);
@@ -85,6 +89,7 @@ objParamIn(Checkpoint *cp, const std::string &section,
#define SERIALIZE_SCALAR(scalar) paramOut(os, #scalar, scalar)
#define UNSERIALIZE_SCALAR(scalar) paramIn(cp, section, #scalar, scalar)
+#define UNSERIALIZE_OPT_SCALAR(scalar) optParamIn(cp, section, #scalar, scalar)
// ENUMs are like SCALARs, but we cast them to ints on the way out
#define SERIALIZE_ENUM(scalar) paramOut(os, #scalar, (int)scalar)