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 namespace armarx
8 {
9 
10 }
11 
12 namespace 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 
21 namespace 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 
30 namespace 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
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:94
armarx::viz::json::meta::KEY
const std::string KEY
Definition: json_base.cpp:85
armarx::viz::json::meta::HIDE
const std::string HIDE
Do not show.
Definition: json_base.cpp:87
armarx::viz::json::meta::COLOR
const std::string COLOR
Use a color picker.
Definition: json_base.cpp:90
armarx::viz::data::from_json
void from_json(nlohmann::json const &j, RecordingBatchHeader &batch)
Definition: ArVizStorage.cpp:432
Color
uint32_t Color
RGBA color.
Definition: color.h:8
cxxopts::value
std::shared_ptr< Value > value()
Definition: cxxopts.hpp:855
armarx::viz::data
Definition: ArVizStorage.cpp:418
armarx::viz::json::meta::ORIENTATION
const std::string ORIENTATION
Definition: json_base.cpp:91
armarx::viz::json::meta::READ_ONLY
const std::string READ_ONLY
Make read-only.
Definition: json_base.cpp:88
armarx::viz::json
Definition: ElementJsonSerializers.cpp:63
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:27
armarx::viz::json::from_json_base
void from_json_base(const nlohmann::json &j, data::Element &value)
Definition: json_base.cpp:108
armarx::viz::data::to_json
void to_json(nlohmann::json &j, RecordingBatchHeader const &batch)
Definition: ArVizStorage.cpp:422