18 #ifndef INCLUDED_SAVEDGAME 19 #define INCLUDED_SAVEDGAME 73 Status Load(
const std::wstring& name,
const ScriptInterface& scriptInterface, JS::MutableHandleValue metadata, std::string& savedState);
92 #endif // INCLUDED_SAVEDGAME bool DeleteSavedGame(const std::wstring &name)
Permanently deletes the saved game archive with the given name.
Definition: SavedGame.cpp:285
std::shared_ptr< JSStructuredCloneData > StructuredClone
Structured clones are a way to serialize 'simple' JS::Values into a buffer that can safely be passed ...
Definition: StructuredClone.h:36
Public API for simulation system.
Definition: Simulation2.h:46
Config::Value_type Value
Definition: json_spirit_value.h:182
i64 Status
Error handling system.
Definition: status.h:169
Definition: SavedGame.h:38
Status Save(const CStrW &name, const CStrW &description, CSimulation2 &simulation, const Script::StructuredClone &guiMetadataClone)
Create new saved game archive with given name and simulation data.
Definition: SavedGame.cpp:56
Status Load(const std::wstring &name, const ScriptInterface &scriptInterface, JS::MutableHandleValue metadata, std::string &savedState)
Load saved game archive with the given name.
Definition: SavedGame.cpp:207
Abstraction around a SpiderMonkey JS::Realm.
Definition: ScriptInterface.h:71
Status SavePrefix(const CStrW &prefix, const CStrW &description, CSimulation2 &simulation, const Script::StructuredClone &guiMetadataClone)
Create new saved game archive with given prefix and simulation data.
Definition: SavedGame.cpp:41
JS::Value GetSavedGames(const ScriptInterface &scriptInterface)
Get list of saved games for GUI script usage.
Definition: SavedGame.cpp:231