1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Creature set serialization

This commit is contained in:
AlexVinS
2016-01-15 20:24:17 +03:00
parent 37d0dad70a
commit a638d0cd51
8 changed files with 97 additions and 33 deletions

View File

@ -186,10 +186,10 @@ public:
}
///Entry point of Json serialization
void writeJson(JsonNode & json, bool withState = false) const;
void writeJson(JsonNode & json) const;
///Entry point of Json de-serialization
void readJson(const JsonNode & json, bool withState = false);
void readJson(const JsonNode & json);
protected:
/// virtual method that allows synchronously update object state on server and all clients
@ -206,14 +206,6 @@ protected:
///(!) do not forget to call inherited method first when overriding
virtual void readJsonOptions(const JsonNode & json);
///Saves object-type specific state
///(!) do not forget to call inherited method first when overriding
virtual void writeJsonState(JsonNode & json) const;
///Loads object-type specific state
///(!) do not forget to call inherited method first when overriding
virtual void readJsonState(const JsonNode & json);
private:
mutable std::string stringId;///<alternate id, dynamically generated, do not serialize
};