Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Helper class for retrieving data from saved game archives. More...
Public Member Functions | |
CGameLoader (const ScriptInterface &scriptInterface, std::string *savedState) | |
void | ReadEntry (const VfsPath &pathname, const CFileInfo &fileInfo, PIArchiveFile archiveFile) |
JS::Value | GetMetadata () |
Static Public Member Functions | |
static void | ReadEntryCallback (const VfsPath &pathname, const CFileInfo &fileInfo, PIArchiveFile archiveFile, uintptr_t cbData) |
Private Member Functions | |
NONCOPYABLE (CGameLoader) | |
Private Attributes | |
const ScriptInterface & | m_ScriptInterface |
JS::PersistentRooted< JS::Value > | m_Metadata |
std::string * | m_SavedState |
Helper class for retrieving data from saved game archives.
|
inline |
scriptInterface | the ScriptInterface used for loading metadata. | |
[out] | savedState | serialized simulation state stored as string of bytes, loaded from simulation.dat inside the archive. |
Note: We use a different approach for returning the string and the metadata JS::Value. We use a pointer for the string to avoid copies (efficiency). We don't use this approach for the metadata because it would be error prone with rooting and the stack-based rooting types and confusing (a chain of pointers pointing to other pointers).
|
inline |
|
private |
|
inline |
|
inlinestatic |
|
private |
|
private |
|
private |