json_base.h
Go to the documentation of this file.
1#pragma once
2
3#include <SimoxUtility/json.h>
4
5#include <RobotAPI/interface/ArViz/Elements.h>
6
7namespace armarx
8{
9
10}
11
12namespace armarx
13{
14 void to_json(nlohmann::json& j, const Vector2f& value);
15 void from_json(const nlohmann::json& j, Vector2f& value);
16
17 void to_json(nlohmann::json& j, const Vector3f& value);
18 void from_json(const nlohmann::json& j, Vector3f& value);
19} // namespace armarx
20
21namespace armarx::viz::data
22{
23 void to_json(nlohmann::json& j, const data::GlobalPose& value);
24 void from_json(const nlohmann::json& j, data::GlobalPose& value);
25
26 void to_json(nlohmann::json& j, const data::Color& color);
27 void from_json(const nlohmann::json& j, data::Color& color);
28} // namespace armarx::viz::data
29
30namespace armarx::viz::json
31{
32
33 namespace meta
34 {
35 extern const std::string KEY;
36
37 /// Do not show.
38 extern const std::string HIDE;
39 /// Make read-only.
40 extern const std::string READ_ONLY;
41
42 // Special edit modes.
43
44 /// Use a color picker.
45 extern const std::string COLOR;
46
47 // extern const std::string POSE;
48 // extern const std::string POSITION;
49 extern const std::string ORIENTATION;
50 } // namespace meta
51
52 void to_json_base(nlohmann::json& j, const data::Element& element);
53 void from_json_base(const nlohmann::json& j, data::Element& value);
54
55} // namespace armarx::viz::json
void to_json(nlohmann::json &j, RecordingBatchHeader const &batch)
void from_json(nlohmann::json const &j, RecordingBatchHeader &batch)
const std::string COLOR
Use a color picker.
Definition json_base.cpp:90
const std::string ORIENTATION
Definition json_base.cpp:91
const std::string READ_ONLY
Make read-only.
Definition json_base.cpp:88
const std::string HIDE
Do not show.
Definition json_base.cpp:87
const std::string KEY
Definition json_base.cpp:85
void from_json_base(const nlohmann::json &j, data::Element &value)
void to_json_base(nlohmann::json &j, const data::Element &element)
Definition json_base.cpp:94
This file offers overloads of toIce() and fromIce() functions for STL container types.
void from_json(const nlohmann::json &j, Vector2f &value)
void to_json(nlohmann::json &j, const Vector2f &value)