diff options
Diffstat (limited to 'sim/sim_object.cc')
-rw-r--r-- | sim/sim_object.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sim/sim_object.cc b/sim/sim_object.cc index f34e17fe6..17d58ba4f 100644 --- a/sim/sim_object.cc +++ b/sim/sim_object.cc @@ -34,6 +34,7 @@ #include "base/misc.hh" #include "base/trace.hh" #include "base/stats/events.hh" +#include "base/serializer.hh" #include "sim/configfile.hh" #include "sim/host.hh" #include "sim/sim_object.hh" @@ -88,6 +89,11 @@ SimObject::SimObject(const string &_name) } void +SimObject::connect() +{ +} + +void SimObject::init() { } @@ -151,6 +157,21 @@ SimObject::regAllStats() } // +// static function: call connect() on all SimObjects. +// +void +SimObject::connectAll() +{ + SimObjectList::iterator i = simObjectList.begin(); + SimObjectList::iterator end = simObjectList.end(); + + for (; i != end; ++i) { + SimObject *obj = *i; + obj->connect(); + } +} + +// // static function: call init() on all SimObjects. // void @@ -228,4 +249,10 @@ SimObject::recordEvent(const std::string &stat) Stats::recordEvent(stat); } +void +SimObject::drain(Serializer *serializer) +{ + serializer->signalDrained(); +} + DEFINE_SIM_OBJECT_CLASS_NAME("SimObject", SimObject) |