Eile Mit Weile
Loading...
Searching...
No Matches
unique_serializable.hpp
1// Used to serialize game_state objects that need to be identifiable by a unique id.
2
3
4#ifndef EILE_MIT_WEILE_UNIQUE_SERIALIZABLE_HPP
5#define EILE_MIT_WEILE_UNIQUE_SERIALIZABLE_HPP
6
7#include "serializable.hpp"
8
15 public:
16 [[nodiscard]] std::string GetId() const;
20 protected:
22 explicit UniqueSerializable(std::string id);
23 std::string id;
24};
25
26
27#endif //EILE_MIT_WEILE_UNIQUE_SERIALIZABLE_HPP
A serializable value, used for writing values into json.
Definition serializable_value.hpp:28
SerializableValue(T val)
Definition serializable_value.hpp:30
Abstract Base Class for a serializable object.
Definition serializable.hpp:17
Used to serialize game_state objects that need to be identifiable by a unique id.
Definition unique_serializable.hpp:14
UniqueSerializable()
Definition unique_serializable.cpp:8
std::string GetId() const
Definition unique_serializable.cpp:12
std::string id
Definition unique_serializable.hpp:23
void WriteIntoJson(rapidjson::Value &json, rapidjson::MemoryPoolAllocator< rapidjson::CrtAllocator > &allocator) const override
Definition unique_serializable.cpp:16