serialize.cc (6227:a17798f2a52c) | serialize.cc (6818:5a0e3a283826) |
---|---|
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; --- 408 unchanged lines hidden (view full) --- 417 if (mkdir(dir.c_str(), 0775) == -1 && errno != EEXIST) 418 fatal("couldn't mkdir %s\n", dir); 419 420 string cpt_file = dir + Checkpoint::baseFilename; 421 ofstream outstream(cpt_file.c_str()); 422 time_t t = time(NULL); 423 if (!outstream.is_open()) 424 fatal("Unable to open file %s for writing\n", cpt_file.c_str()); | 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; --- 408 unchanged lines hidden (view full) --- 417 if (mkdir(dir.c_str(), 0775) == -1 && errno != EEXIST) 418 fatal("couldn't mkdir %s\n", dir); 419 420 string cpt_file = dir + Checkpoint::baseFilename; 421 ofstream outstream(cpt_file.c_str()); 422 time_t t = time(NULL); 423 if (!outstream.is_open()) 424 fatal("Unable to open file %s for writing\n", cpt_file.c_str()); |
425 outstream << "// checkpoint generated: " << ctime(&t); | 425 outstream << "## checkpoint generated: " << ctime(&t); |
426 427 globals.serialize(outstream); 428 SimObject::serializeAll(outstream); 429} 430 431void 432Serializable::unserializeAll(const string &cpt_dir) 433{ --- 144 unchanged lines hidden --- | 426 427 globals.serialize(outstream); 428 SimObject::serializeAll(outstream); 429} 430 431void 432Serializable::unserializeAll(const string &cpt_dir) 433{ --- 144 unchanged lines hidden --- |