changes regarding fs.py
[gem5.git] / src / sim / serialize.hh
index 1eb721cf4f1798674a31587d38bf7bf275a7a3da..880fb0785859d85427ee31239fce4b77315752f7 100644 (file)
@@ -25,7 +25,8 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * Authors: Erik Hallnor
+ * Authors: Nathan Binkert
+ *          Erik Hallnor
  *          Steve Reinhardt
  */
 
@@ -42,8 +43,8 @@
 #include <map>
 
 #include "sim/host.hh"
-#include "sim/configfile.hh"
 
+class IniFile;
 class Serializable;
 class Checkpoint;
 
@@ -125,7 +126,8 @@ class Serializable
     static int ckptCount;
     static int ckptMaxCount;
     static int ckptPrevCount;
-    static void serializeAll();
+    static void serializeAll(const std::string &cpt_dir);
+    static void unserializeAll(const std::string &cpt_dir);
     static void unserializeGlobals(Checkpoint *cp);
 };
 
@@ -177,7 +179,7 @@ class SerializableClass
     // an optional config hierarchy node (specified by the third
     // argument).  A pointer to the new SerializableBuilder is returned.
     typedef Serializable *(*CreateFunc)(Checkpoint *cp,
-                                         const std::string &section);
+                                        const std::string &section);
 
     static std::map<std::string,CreateFunc> *classMap;
 
@@ -191,7 +193,7 @@ class SerializableClass
     // create Serializable given name of class and pointer to
     // configuration hierarchy node
     static Serializable *createObject(Checkpoint *cp,
-                                       const std::string &section);
+                                      const std::string &section);
 };
 
 //
@@ -203,18 +205,19 @@ class SerializableClass
 SerializableClass the##OBJ_CLASS##Class(CLASS_NAME,                       \
                                          OBJ_CLASS::createForUnserialize);
 
+void
+setCheckpointDir(const std::string &name);
+
 class Checkpoint
 {
   private:
 
     IniFile *db;
     const std::string basePath;
-    const ConfigNode *configNode;
     std::map<std::string, Serializable*> objMap;
 
   public:
-    Checkpoint(const std::string &cpt_dir, const std::string &path,
-               const ConfigNode *_configNode);
+    Checkpoint(const std::string &cpt_dir, const std::string &path);
 
     const std::string cptDir;
 
@@ -238,9 +241,6 @@ class Checkpoint
 
     // Filename for base checkpoint file within directory.
     static const char *baseFilename;
-
-    // Set up a checkpoint creation event or series of events.
-    static void setup(Tick when, Tick period = 0);
 };
 
 #endif // __SERIALIZE_HH__