MCPcopy Create free account
hub / github.com/bgrimstad/splinter / Saveable

Class Saveable

include/saveable.h:19–38  ·  view source on GitHub ↗

* Interface for save and load functionality */

Source from the content-addressed store, hash-verified

17 * Interface for save and load functionality
18 */
19class Saveable
20{
21public:
22 Saveable() {}
23 virtual ~Saveable() {}
24
25 /**
26 * Serialize and save object to fileName
27 * Should throw exception if file could not be opened
28 */
29 virtual void save(const std::string &fileName) const = 0;
30
31protected:
32 /**
33 * Deserialize and load object from fileName
34 * Should throw exception if file could not be opened
35 * or if the file format is wrong
36 */
37 virtual void load(const std::string &fileName) = 0;
38};
39
40} // namespace SPLINTER
41

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected