mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
added serializable class
This commit is contained in:
parent
a9b55f35be
commit
8466c42896
6 changed files with 64 additions and 41 deletions
15
src/interfaces/Serializable.h
Normal file
15
src/interfaces/Serializable.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef SERIALIZABLE_H
|
||||
#define SERIALIZABLE_H
|
||||
|
||||
#include <memory>
|
||||
#include "../coders/json.h"
|
||||
|
||||
class Serializable
|
||||
{
|
||||
public:
|
||||
virtual ~Serializable() { }
|
||||
virtual std::unique_ptr<dynamic::Map> serialize() const = 0;
|
||||
virtual void deserialize(dynamic::Map* src) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue