Merge saidi@zizzer.eecs.umich.edu:/bk/linux
[gem5.git] / sim / sim_object.hh
index 20da0716418d9b3036d6fa65401719f5b6b11c10..1a9ed363d160a293cafb4605a8492700d56b0709 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2001-2004 The Regents of The University of Michigan
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * correspond to physical components and can be specified via the
  * config file (CPUs, caches, etc.).
  */
-class SimObject : public Serializeable
+class SimObject : public Serializable
 {
+  protected:
+    std::string objName;
+
   private:
     friend class Serializer;
 
@@ -60,19 +63,25 @@ class SimObject : public Serializeable
 
     virtual ~SimObject() {}
 
+    virtual const std::string name() const { return objName; }
+
+    // initialization pass of all objects.  Gets invoked by SimInit()
+    virtual void init();
+    static void initAll();
+
     // register statistics for this object
     virtual void regStats();
     virtual void regFormulas();
-
-    // print extra results for this object not covered by registered
-    // statistics (called at end of simulation)
-    virtual void printExtraOutput(std::ostream&);
+    virtual void resetStats();
 
     // static: call reg_stats on all SimObjects
     static void regAllStats();
 
-    // static: call printExtraOutput on all SimObjects
-    static void printAllExtraOutput(std::ostream&);
+    // static: call resetStats on all SimObjects
+    static void resetAllStats();
+
+    // static: call nameOut() & serialize() on all SimObjects
+    static void serializeAll(std::ostream &);
 };
 
 #endif // __SIM_OBJECT_HH__