diff options
Diffstat (limited to 'sim/sim_object.cc')
-rw-r--r-- | sim/sim_object.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sim/sim_object.cc b/sim/sim_object.cc index 90ad78648..364dbe035 100644 --- a/sim/sim_object.cc +++ b/sim/sim_object.cc @@ -155,3 +155,19 @@ SimObject::printAllExtraOutput(ostream &os) obj->printExtraOutput(os); } } + +// +// static function: serialize all SimObjects. +// +void +SimObject::serializeAll(ostream &os) +{ + SimObjectList::iterator i = simObjectList.begin(); + SimObjectList::iterator end = simObjectList.end(); + + for (; i != end; ++i) { + SimObject *obj = *i; + obj->nameOut(os); + obj->serialize(os); + } +} |