Last active
May 19, 2019 13:07
-
-
Save eugeneko/c0dbdbf12da9c68534e2e6f0099af2bd to your computer and use it in GitHub Desktop.
Archive interface
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Archive | |
| { | |
| /// Binary: [value] | |
| /// XML: <name type="T">value</name> | |
| /// JSON: "name": value (begin block or begin map) | |
| /// value (begin array) | |
| virtual bool Serialize(const char* name, T& value) = 0; | |
| /// Binary: [key][value] | |
| /// XML: <name key="key" type="T">value</name> | |
| /// JSON: "key": value (begin block or begin map) | |
| /// { "key": value }(begin array) | |
| virtual bool Serialize(const char* name, ea::string& key, T& value) = 0; | |
| /// Binary: [] | |
| /// XML: <name> | |
| /// JSON: "name": { | |
| virtual void BeginBlock(const char* name) = 0; | |
| /// Binary: [] | |
| /// XML: </name> | |
| /// JSON: } | |
| virtual void EndBlock() = 0; | |
| /// Binary: [size] | |
| /// XML: <name> | |
| /// JSON: "name": [ | |
| virtual void BeginArray(const char* name, unsigned size) = 0; | |
| /// Binary: [] | |
| /// XML: </name> | |
| /// JSON: ] | |
| virtual void EndArray() = 0; | |
| /// Binary: [size] | |
| /// XML: <name> | |
| /// JSON: "name": { | |
| virtual void BeginMap(const char* name, unsigned size) = 0; | |
| /// Binary: [] | |
| /// XML: </name> | |
| /// JSON: } | |
| virtual void EndMap() = 0; | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment