Overte C++ Documentation
JSONHelpers.h
1 //
2 // Created by Bradley Austin Davis on 2015/11/09
3 // Copyright 2013-2015 High Fidelity, Inc.
4 //
5 // Distributed under the Apache License, Version 2.0.
6 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 //
8 
9 #pragma once
10 #ifndef hifi_Shared_JSONHelpers_h
11 #define hifi_Shared_JSONHelpers_h
12 
13 #include "../GLMHelpers.h"
14 
15 QJsonValue toJsonValue(const quat& q);
16 QJsonValue toJsonValue(const vec3& v);
17 QJsonValue toJsonValue(const vec4& v);
18 QJsonValue toJsonValueHelper(const QVariant& variant, int type);
19 QJsonValue toJsonValue(const QObject& o);
20 QJsonValue toJsonValue(const QObject& o, const std::vector<QString>& props);
21 
22 quat quatFromJsonValue(const QJsonValue& q);
23 vec3 vec3FromJsonValue(const QJsonValue& v);
24 vec4 vec4FromJsonValue(const QJsonValue& v);
25 void qObjectFromJsonValue(const QJsonValue& j, QObject& o);
26 
27 #endif