|
Eile Mit Weile
|
Used to serialize game_state objects that need to be identifiable by a unique id. More...
#include <unique_serializable.hpp>
Public Member Functions | |
| std::string | GetId () const |
| void | WriteIntoJson (rapidjson::Value &json, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator) const override |
Public Member Functions inherited from Serializable | |
| virtual rapidjson::Document * | ToJson () const |
| virtual void | WriteIntoJson (rapidjson::Value &json, rapidjson::Document::AllocatorType &allocator) const =0 |
Protected Member Functions | |
| UniqueSerializable () | |
| UniqueSerializable (std::string id) | |
Protected Attributes | |
| std::string | id |
Used to serialize game_state objects that need to be identifiable by a unique id.
|
protected |
Constructor that generates a unqize id with uuid_generator::GenerateUuidV4
|
explicitprotected |
Constructor that uses a given id
| std::string UniqueSerializable::GetId | ( | ) | const |
Getter for the id
|
override |
Serializes a UniqueSerializable object into a json object.
|
protected |
Unique id of UniqueSerializable object.