Wizard
Software Engineering Project - Wizard
Loading...
Searching...
No Matches
src
common
serialization
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
12
class
unique_serializable
:
public
serializable
{
13
protected
:
14
15
std::string _id;
// unique identifier
16
17
unique_serializable
();
18
unique_serializable
(std::string
id
);
19
20
public
:
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
serializable
Definition
serializable.h:11
unique_serializable
Definition
unique_serializable.h:12
Generated by
1.12.0