#include <assert.h>
-#include "sim/sim_object.hh"
+#include "base/callback.hh"
#include "base/inifile.hh"
-#include "sim/configfile.hh"
-#include "sim/host.hh"
#include "base/misc.hh"
#include "base/trace.hh"
+#include "sim/configfile.hh"
+#include "sim/host.hh"
+#include "sim/sim_object.hh"
#include "sim/sim_stats.hh"
using namespace std;
{
}
+namespace {
+ class __SimObjectResetCB : public Callback
+ {
+ public:
+ __SimObjectResetCB() { Statistics::RegResetCallback(this); }
+ virtual void process() { SimObject::resetAllStats(); }
+ };
+ __SimObjectResetCB __theSimObjectResetCB;
+}
+
+void
+SimObject::resetStats()
+{
+}
+
//
// no default extra output
//
}
}
+//
+// static function: call resetStats() on all SimObjects.
+//
+void
+SimObject::resetAllStats()
+{
+}
+
//
// static function: call printExtraOutput() on all SimObjects.
//
// register statistics for this object
virtual void regStats();
virtual void regFormulas();
+ virtual void resetStats();
// print extra results for this object not covered by registered
// statistics (called at end of simulation)
// static: call reg_stats on all SimObjects
static void regAllStats();
+ // static: call resetStats on all SimObjects
+ static void resetAllStats();
+
// static: call printExtraOutput on all SimObjects
static void printAllExtraOutput(std::ostream&);
};