diff options
Diffstat (limited to 'sim/sim_object.cc')
-rw-r--r-- | sim/sim_object.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sim/sim_object.cc b/sim/sim_object.cc index 364dbe035..b3ac2c7a4 100644 --- a/sim/sim_object.cc +++ b/sim/sim_object.cc @@ -60,6 +60,11 @@ SimObject::SimObject(const string &_name) simObjectList.push_back(this); } +void +SimObject::init() +{ +} + // // no default statistics, so nothing to do in base implementation // @@ -127,6 +132,21 @@ SimObject::regAllStats() } // +// static function: call init() on all SimObjects. +// +void +SimObject::initAll() +{ + SimObjectList::iterator i = simObjectList.begin(); + SimObjectList::iterator end = simObjectList.end(); + + for (; i != end; ++i) { + SimObject *obj = *i; + obj->init(); + } +} + +// // static function: call resetStats() on all SimObjects. // void |