//
// Treat 8-bit ints (chars) as ints on output, not as chars
+template <>
+void
+showParam(ostream &os, const char &value)
+{
+ os << (int)value;
+}
+
+
template <>
void
showParam(ostream &os, const signed char &value)
// for which operator[] returns a special reference class
// that's not the same as 'bool&', (since it's a packed
// vector)
- T scalar_value;
+ T scalar_value = 0;
if (!parseParam(tokens[i], scalar_value)) {
string err("could not parse \"");
// for which operator[] returns a special reference class
// that's not the same as 'bool&', (since it's a packed
// vector)
- T scalar_value;
+ T scalar_value = 0;
if (!parseParam(tokens[i], scalar_value)) {
string err("could not parse \"");
arrayParamIn(Checkpoint *cp, const string §ion, \
const string &name, vector<type> ¶m);
+INSTANTIATE_PARAM_TEMPLATES(char)
INSTANTIATE_PARAM_TEMPLATES(signed char)
INSTANTIATE_PARAM_TEMPLATES(unsigned char)
INSTANTIATE_PARAM_TEMPLATES(signed short)
SimObject::serializeAll(outstream);
}
-void
-Serializable::unserializeAll(const string &cpt_dir)
-{
- string dir = Checkpoint::setDir(cpt_dir);
-
- DPRINTFR(Config, "Loading checkpoint dir '%s'\n", dir);
- Checkpoint *cp = new Checkpoint(dir);
- unserializeGlobals(cp);
- SimObject::unserializeAll(cp);
-}
-
void
Serializable::unserializeGlobals(Checkpoint *cp)
{
Checkpoint::Checkpoint(const string &cpt_dir)
- : db(new IniFile), cptDir(cpt_dir)
+ : db(new IniFile), cptDir(setDir(cpt_dir))
{
- string filename = cpt_dir + "/" + Checkpoint::baseFilename;
+ string filename = cptDir + "/" + Checkpoint::baseFilename;
if (!db->load(filename)) {
fatal("Can't load checkpoint file '%s'\n", filename);
}