src/sim/sim_object.cc
//
// static function: serialize all SimObjects.
//
static function: serialize all SimObjects.
static function : serialize all SimObjects .
void
SimObject::serializeAll(const std::string &cpt_dir)
{
    std::ofstream cp;
    Serializable::generateCheckpointOut(cpt_dir, cp);
    SimObjectList::reverse_iterator ri = simObjectList.rbegin();
    SimObjectList::reverse_iterator rend = simObjectList.rend();
    for (; ri != rend; ++ri) {
        SimObject *obj = *ri;
        obj->serializeSection(cp, obj->name());
   }
}
void SimObject :: serializeAll ( const std :: string & cpt_dir ) { std :: ofstream cp ; Serializable :: generateCheckpointOut ( cpt_dir , cp ) ; SimObjectList :: reverse_iterator ri = simObjectList . rbegin ( ) ; SimObjectList :: reverse_iterator rend = simObjectList . rend ( ) ; for ( ; ri != rend ; ++ ri ) { SimObject * obj = * ri ; obj -> serializeSection ( cp , obj -> name ( ) ) ; } }
static function: serialize all SimObjects.
static function : serialize all SimObjects .
// This works despite name() returning a fully qualified name // since we are at the top level.