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 
7 
8 namespace armarx
9 {
10 
11 }
12 
13 
14 namespace armarx
15 {
16  void to_json(nlohmann::json& j, const Vector2f& value);
17  void from_json(const nlohmann::json& j, Vector2f& value);
18 
19  void to_json(nlohmann::json& j, const Vector3f& value);
20  void from_json(const nlohmann::json& j, Vector3f& value);
21 }
22 
23 
24 namespace armarx::viz::data
25 {
26  void to_json(nlohmann::json& j, const data::GlobalPose& value);
27  void from_json(const nlohmann::json& j, data::GlobalPose& value);
28 
29  void to_json(nlohmann::json& j, const data::Color& color);
30  void from_json(const nlohmann::json& j, data::Color& color);
31 }
32 
33 
34 namespace armarx::viz::json
35 {
36 
37  namespace meta
38  {
39  extern const std::string KEY;
40 
41  /// Do not show.
42  extern const std::string HIDE;
43  /// Make read-only.
44  extern const std::string READ_ONLY;
45 
46  // Special edit modes.
47 
48  /// Use a color picker.
49  extern const std::string COLOR;
50 
51  // extern const std::string POSE;
52  // extern const std::string POSITION;
53  extern const std::string ORIENTATION;
54  }
55 
56 
57  void to_json_base(nlohmann::json& j, const data::Element& element);
58  void from_json_base(const nlohmann::json& j, data::Element& value);
59 
60 }
61 
armarx::to_json
void to_json(nlohmann::json &j, const Vector2f &value)
armarx::viz::json::to_json_base
void to_json_base(nlohmann::json &j, const data::Element &element)
Definition: json_base.cpp:86
armarx::viz::json::meta::KEY
const std::string KEY
Definition: json_base.cpp:77
armarx::viz::json::meta::HIDE
const std::string HIDE
Do not show.
Definition: json_base.cpp:79
armarx::viz::json::meta::COLOR
const std::string COLOR
Use a color picker.
Definition: json_base.cpp:82
armarx::viz::data::from_json
void from_json(nlohmann::json const &j, RecordingBatchHeader &batch)
Definition: ArVizStorage.cpp:382
Color
uint32_t Color
RGBA color.
Definition: color.h:8
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:926
armarx::viz::data
Definition: ArVizStorage.cpp:370
armarx::viz::json::meta::ORIENTATION
const std::string ORIENTATION
Definition: json_base.cpp:83
armarx::viz::json::meta::READ_ONLY
const std::string READ_ONLY
Make read-only.
Definition: json_base.cpp:80
armarx::viz::json
Definition: ElementJsonSerializers.cpp:61
armarx::from_json
void from_json(const nlohmann::json &j, Vector2f &value)
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::viz::json::from_json_base
void from_json_base(const nlohmann::json &j, data::Element &value)
Definition: json_base.cpp:98
armarx::viz::data::to_json
void to_json(nlohmann::json &j, RecordingBatchHeader const &batch)
Definition: ArVizStorage.cpp:373