Wizard
Software Engineering Project - Wizard
Loading...
Searching...
No Matches
unique_serializable.h
1//
2// Created by Manuel on 03.02.2021.
3//
4// Used to serialize game_state objects that need to be identifiable by a unique id.
5
6#ifndef WIZARD_UNIQUE_SERIALIZABLE_H
7#define WIZARD_UNIQUE_SERIALIZABLE_H
8
9
10#include "serializable.h"
11
13protected:
14
15 std::string _id; // unique identifier
16
18 unique_serializable(std::string id);
19
20public:
21// accessors
22 std::string get_id() const;
23
24// serializable interface
25 virtual void write_into_json(rapidjson::Value& json,
26 rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator> &allocator) const override;
27
28};
29
30#endif //WIZARD_UNIQUE_SERIALIZABLE_H
Definition serializable.h:11
Definition unique_serializable.h:12