TerraForge3D  2.3.1
3D Terrain And Landscape Generator
Serializer.h
1#pragma once
2
3#include "json/json.hpp"
4
5#include <functional>
6
8
10{
11public:
12
14
15 Serializer(ApplicationState *state, std::function<void(std::string, bool)> errorFunc);
16
18
19 nlohmann::json Serialize();
20
21 void PackProject(std::string path);
22
23 void LoadPackedProject(std::string path);
24
25 void SaveFile(std::string path);
26
27 void LoadFile(std::string path);
28
29 ApplicationState *Deserialize(nlohmann::json data);
30
31private:
32 nlohmann::json data;
33 std::function<void(std::string, bool)> onError;
34 ApplicationState *appState;
35};
a class to store JSON values
Definition: json.hpp:17860