serialize.cc (5543:3af77710f397) serialize.cc (5581:5e1863e9afa2)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 391 unchanged lines hidden (view full) ---

400 setCheckpointDir(cpt_dir);
401 string dir = Checkpoint::dir();
402 if (mkdir(dir.c_str(), 0775) == -1 && errno != EEXIST)
403 fatal("couldn't mkdir %s\n", dir);
404
405 string cpt_file = dir + Checkpoint::baseFilename;
406 ofstream outstream(cpt_file.c_str());
407 time_t t = time(NULL);
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 391 unchanged lines hidden (view full) ---

400 setCheckpointDir(cpt_dir);
401 string dir = Checkpoint::dir();
402 if (mkdir(dir.c_str(), 0775) == -1 && errno != EEXIST)
403 fatal("couldn't mkdir %s\n", dir);
404
405 string cpt_file = dir + Checkpoint::baseFilename;
406 ofstream outstream(cpt_file.c_str());
407 time_t t = time(NULL);
408 if (!outstream.is_open())
409 fatal("Unable to open file %s for writing\n", cpt_file.c_str());
408 outstream << "// checkpoint generated: " << ctime(&t);
409
410 globals.serialize(outstream);
411 SimObject::serializeAll(outstream);
412}
413
414void
415Serializable::unserializeAll(const std::string &cpt_dir)

--- 152 unchanged lines hidden ---
410 outstream << "// checkpoint generated: " << ctime(&t);
411
412 globals.serialize(outstream);
413 SimObject::serializeAll(outstream);
414}
415
416void
417Serializable::unserializeAll(const std::string &cpt_dir)

--- 152 unchanged lines hidden ---