00001 // Copyright 2009-2015 Sandia Corporation. Under the terms 00002 // of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. 00003 // Government retains certain rights in this software. 00004 // 00005 // Copyright (c) 2009-2015, Sandia Corporation 00006 // All rights reserved. 00007 // 00008 // This file is part of the SST software package. For license 00009 // information, see the LICENSE file in the top level directory of the 00010 // distribution. 00011 00012 00013 #ifndef SST_CORE_ARCHIVE_H 00014 #define SST_CORE_ARCHIVE_H 00015 00016 #include <string> 00017 00018 // Do NOT include a serialization header in this file. The 00019 // implementation of Archive requires some special Boost.Serialization 00020 // magic not needed for the rest of the core, and it is handled in 00021 // archive.cc. There's no serialization interfaces in this header, so 00022 // no include is required. 00023 00024 namespace SST { 00025 class Simulation; 00026 00027 /** 00028 * \class Archive 00029 * Archives are used for checkpoint/restart. 00030 * NOT a Public API. 00031 */ 00032 class Archive { 00033 public: 00034 /** Create a new Archive. 00035 * @param ttype - Type of archive (xml, text, bin) 00036 * @param filename - File to archive to or from 00037 */ 00038 Archive(std::string, std::string); 00039 ~Archive(); 00040 00041 /** Save the simulation state to a file */ 00042 void saveSimulation(Simulation* sim); 00043 /** Restore Simulation state from a file */ 00044 Simulation* loadSimulation(void); 00045 private: 00046 Archive(); // do not implement 00047 std::string type; 00048 std::string filename; 00049 }; 00050 00051 } //namespace SST 00052 00053 #endif // SST_CORE_ARCHIVE_H