blob: e3eb977abb7d378dce0693d1870a6e42b2baef56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#pragma once
#include "src/scenery.hpp"
#include <vector>
#include <Corrade/Containers/String.h>
#include <nlohmann/json_fwd.hpp>
namespace floormat::Serialize {
struct serialized_scenery final
{
String name, descr;
scenery_proto proto;
};
} // namespace floormat::Serialize
namespace nlohmann {
template<> struct adl_serializer<floormat::scenery_type> {
static void to_json(json& j, floormat::scenery_type val);
static void from_json(const json& j, floormat::scenery_type& val);
};
template<> struct adl_serializer<floormat::rotation> {
static void to_json(json& j, floormat::rotation val);
static void from_json(const json& j, floormat::rotation& val);
};
template<> struct adl_serializer<floormat::scenery_proto> {
static void to_json(json& j, const floormat::scenery_proto& val);
static void from_json(const json& j, floormat::scenery_proto& val);
};
template<> struct adl_serializer<floormat::Serialize::serialized_scenery> {
static void to_json(json& j, const floormat::Serialize::serialized_scenery& val);
static void from_json(const json& j, floormat::Serialize::serialized_scenery& val);
};
} // namespace nlohmann
|