Hymn to Beauty
C++ 3D Engine
Json.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <json/json.h>
4#include <glm/glm.hpp>
5#include <string>
6
7class TextureAsset;
8namespace Geometry {
9class Model;
10}
11
12namespace Json {
13
15
22void Serialize(Value& node, bool load, const std::string& name, bool& value, bool defaultValue);
23
25
32void Serialize(Value& node, bool load, const std::string& name, int32_t& value, int32_t defaultValue);
33
35
42void Serialize(Value& node, bool load, const std::string& name, uint32_t& value, uint32_t defaultValue);
43
45
52void Serialize(Value& node, bool load, const std::string& name, float& value, float defaultValue);
53
55
62void Serialize(Value& node, bool load, const std::string& name, glm::vec2& value, const glm::vec2& defaultValue);
63
65
72void Serialize(Value& node, bool load, const std::string& name, glm::vec3& value, const glm::vec3& defaultValue);
73
75
82void Serialize(Value& node, bool load, const std::string& name, glm::vec4& value, const glm::vec4& defaultValue);
83
85
92void Serialize(Value& node, bool load, const std::string& name, glm::quat& value, const glm::quat& defaultValue);
93
95
102void Serialize(Value& node, bool load, const std::string& name, std::string& value, const std::string& defaultValue);
103
105
111void Serialize(Value& node, bool load, const std::string& name, TextureAsset*& value);
112
114
120void Serialize(Value& node, bool load, const std::string& name, Geometry::Model*& value);
121
122} // namespace Json
Interface of a model loaded from a file.
Definition: Model.hpp:8
A texture used in a hymn.
Definition: TextureAsset.hpp:12
Definition: AssetEditor.hpp:5
Definition: Json.cpp:3
void Serialize(Value &node, bool load, const std::string &name, bool &value, bool defaultValue)
Serialize a boolean value.
Definition: Json.cpp:11