serialize.hh (5543:3af77710f397) serialize.hh (5739:27c1d1048c65)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 107 unchanged lines hidden (view full) ---

116 */
117class Serializable
118{
119 protected:
120 void nameOut(std::ostream &os);
121 void nameOut(std::ostream &os, const std::string &_name);
122
123 public:
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 107 unchanged lines hidden (view full) ---

116 */
117class Serializable
118{
119 protected:
120 void nameOut(std::ostream &os);
121 void nameOut(std::ostream &os, const std::string &_name);
122
123 public:
124 Serializable() {}
125 virtual ~Serializable() {}
124 Serializable();
125 virtual ~Serializable();
126
127 // manditory virtual function, so objects must provide names
128 virtual const std::string name() const = 0;
129
126
127 // manditory virtual function, so objects must provide names
128 virtual const std::string name() const = 0;
129
130 virtual void serialize(std::ostream &os) {}
131 virtual void unserialize(Checkpoint *cp, const std::string &section) {}
130 virtual void serialize(std::ostream &os);
131 virtual void unserialize(Checkpoint *cp, const std::string &section);
132
132
133 static Serializable *create(Checkpoint *cp,
134 const std::string &section);
133 static Serializable *create(Checkpoint *cp, const std::string &section);
135
136 static int ckptCount;
137 static int ckptMaxCount;
138 static int ckptPrevCount;
139 static void serializeAll(const std::string &cpt_dir);
140 static void unserializeAll(const std::string &cpt_dir);
141 static void unserializeGlobals(Checkpoint *cp);
142};

--- 114 unchanged lines hidden ---
134
135 static int ckptCount;
136 static int ckptMaxCount;
137 static int ckptPrevCount;
138 static void serializeAll(const std::string &cpt_dir);
139 static void unserializeAll(const std::string &cpt_dir);
140 static void unserializeGlobals(Checkpoint *cp);
141};

--- 114 unchanged lines hidden ---