#include
Public Member Functions | |
virtual bool | LoadJsonFile (const SStruct &outObj, const char *filename, bool bCanBeOnDisk)=0 |
virtual bool | SaveJsonFile (const char *filename, const SStruct &obj)=0 |
virtual bool | LoadJsonBuffer (const SStruct &outObj, const char *buffer, size_t bufferLength)=0 |
virtual bool | SaveJsonBuffer (DynArray< char > &outBuffer, const SStruct &obj)=0 |
virtual bool | LoadBinaryFile (const SStruct &outObj, const char *filename)=0 |
virtual bool | SaveBinaryFile (const char *filename, const SStruct &obj)=0 |
virtual bool | LoadBinaryBuffer (const SStruct &outObj, const char *buffer, size_t bufferLength)=0 |
virtual bool | SaveBinaryBuffer (DynArray< char > &outBuffer, const SStruct &obj)=0 |
virtual bool | CloneBinary (const SStruct &dest, const SStruct &source)=0 |
virtual bool | CompareBinary (const SStruct &lhs, const SStruct &rhs)=0 |
Compares two instances in serialized form through binary archive. | |
virtual bool | LoadXmlFile (const SStruct &outObj, const char *filename, ECryXmlVersion forceVersion=ECryXmlVersion::Auto)=0 |
virtual bool | SaveXmlFile (const char *filename, const SStruct &obj, const char *rootNodeName, ECryXmlVersion forceVersion=ECryXmlVersion::Auto)=0 |
virtual bool | LoadXmlNode (const SStruct &outObj, const XmlNodeRef &node, ECryXmlVersion forceVersion=ECryXmlVersion::Auto)=0 |
virtual XmlNodeRef | SaveXmlNode (const SStruct &obj, const char *nodeName, ECryXmlVersion forceVersion=ECryXmlVersion::Auto)=0 |
virtual bool | SaveXmlNode (XmlNodeRef &node, const SStruct &obj, ECryXmlVersion forceVersion=ECryXmlVersion::Auto)=0 |
virtual bool | LoadBlackBox (const SStruct &outObj, SBlackBox &box)=0 |
IArchiveHost serves a purpose of sharing IArchive implementations among diffferent modules. Example of usage: struct SType { void Serialize(Serialization::IArchive& ar); };
SType instanceToSave; bool saved = Serialization::SaveJsonFile("Scripts/instance.json", instanceToSave);
SType instanceToLoad; bool loaded = Serialization::LoadJsonFile(instanceToLoad, "Scripts/instance.json");