Data.h
Go to the documentation of this file.
1/*
2* This file is part of ArmarX.
3*
4* ArmarX is free software; you can redistribute it and/or modify
5* it under the terms of the GNU General Public License version 2 as
6* published by the Free Software Foundation.
7*
8* ArmarX is distributed in the hope that it will be useful, but
9* WITHOUT ANY WARRANTY; without even the implied warranty of
10* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11* GNU General Public License for more details.
12*
13* You should have received a copy of the GNU General Public License
14* along with this program. If not, see <http://www.gnu.org/licenses/>.
15*
16* @author Fabian Peller (fabian dot peller at kit dot edu)
17* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
18* GNU General Public License
19*/
20
21#pragma once
22
23// STD/STL
24#include <string>
25
26// ArmarX
27#include <RobotAPI/interface/aron.h>
29
31{
32 namespace constantes
33 {
34 const std::string TYPE_SLUG = "_ARON_TYPE";
35 const std::string PATH_SLUG = "_ARON_PATH";
36 const std::string IMPORTANCE_SLUG = "_ARON_IMPORTANCE";
37 const std::string VERSION_SLUG = "_ARON_VERSION";
38
39 const std::string KEY_SLUG = "_ARON_KEY";
40 const std::string VALUE_SLUG = "_ARON_VALUE";
41 const std::string MEMBERS_SLUG = "_ARON_MEMBERS";
42 const std::string ELEMENTS_SLUG = "_ARON_ELEMENTS";
43
44 const std::string NAME_SLUG = "_ARON_NAME";
45 const std::string DIMENSIONS_SLUG = "_ARON_DIMESIONS";
46 const std::string DATA_SLUG = "_ARON_DATA";
47 const std::string USED_TYPE_SLUG = "_ARON_USED_TYPE";
48
49 const std::string LIST_TYPENAME_SLUG = "_ARON_LIST";
50 const std::string DICT_TYPENAME_SLUG = "_ARON_DICT";
51 const std::string NDARRAY_TYPENAME_SLUG = "_ARON_NDARRAY";
52 const std::string INT_TYPENAME_SLUG = "_ARON_INT";
53 const std::string LONG_TYPENAME_SLUG = "_ARON_LONG";
54 const std::string FLOAT_TYPENAME_SLUG = "_ARON_FLOAT";
55 const std::string DOUBLE_TYPENAME_SLUG = "_ARON_DOUBLE";
56 const std::string STRING_TYPENAME_SLUG = "_ARON_STRING";
57 const std::string BOOL_TYPENAME_SLUG = "_ARON_BOOL";
58 const std::string TIME_TYPENAME_SLUG = "_ARON_TIME";
59 } // namespace constantes
60
61 namespace conversion
62 {
74
75 const std::map<type::Maybe, std::string> Maybe2String = {
76 {type::Maybe::NONE, "type::maybe::NONE"},
77 {type::Maybe::OPTIONAL, "type::maybe::OPTIONAL"},
78 {type::Maybe::RAW_PTR, "type::maybe::RAW_PTR"},
79 {type::Maybe::SHARED_PTR, "type::maybe::SHARED_PTR"},
80 {type::Maybe::UNIQUE_PTR, "type::maybe::UNIQUE_PTR"}};
82
83 const std::map<type::ndarray::ElementType, std::string> NDArrayType2String = {
84 {type::ndarray::ElementType::INT8, "type::ndarray::INT8"},
85 {type::ndarray::ElementType::INT16, "type::ndarray::INT16"},
86 {type::ndarray::ElementType::INT32, "type::ndarray::INT32"},
87 {type::ndarray::ElementType::UINT8, "type::ndarray::UINT8"},
88 {type::ndarray::ElementType::UINT16, "type::ndarray::UINT16"},
89 {type::ndarray::ElementType::UINT32, "type::ndarray::UINT32"},
90 {type::ndarray::ElementType::FLOAT32, "type::ndarray::FLOAT32"},
91 {type::ndarray::ElementType::FLOAT64, "type::ndarray::FLOAT64"}};
93
94 const std::map<type::matrix::ElementType, std::string> MatrixType2String = {
95 {type::matrix::ElementType::UINT8, "type::matrix::UINT8"},
96 {type::matrix::ElementType::UINT16, "type::matrix::UINT16"},
97 {type::matrix::ElementType::UINT32, "type::matrix::UINT32"},
98 {type::matrix::ElementType::INT8, "type::matrix::INT8"},
99 {type::matrix::ElementType::INT16, "type::matrix::INT16"},
100 {type::matrix::ElementType::INT32, "type::matrix::INT32"},
101 {type::matrix::ElementType::INT64, "type::matrix::INT64"},
102 {type::matrix::ElementType::FLOAT32, "type::matrix::FLOAT32"},
103 {type::matrix::ElementType::FLOAT64, "type::matrix::FLOAT64"}};
105
106 const std::map<type::quaternion::ElementType, std::string> QuaternionType2String = {
107 {type::quaternion::ElementType::FLOAT32, "type::quaternion::FLOAT32"},
108 {type::quaternion::ElementType::FLOAT64, "type::quaternion::FLOAT64"}};
110
111 const std::map<type::image::PixelType, std::string> PixelType2String = {
112 {type::image::PixelType::RGB24, "type::image::RGB24"},
113 {type::image::PixelType::DEPTH32, "type::image::DEPTH32"}};
115
116 const std::map<type::pointcloud::VoxelType, std::string> VoxelType2String = {
117 {type::pointcloud::VoxelType::POINT_XYZ, "type::pointcloud::POINT_XYZ"},
118 {type::pointcloud::VoxelType::POINT_XYZI, "type::pointcloud::POINT_XYZI"},
119 {type::pointcloud::VoxelType::POINT_XYZL, "type::pointcloud::POINT_XYZL"},
120 {type::pointcloud::VoxelType::POINT_XYZRGB, "type::pointcloud::POINT_XYZRGB"},
121 {type::pointcloud::VoxelType::POINT_XYZRGBA, "type::pointcloud::POINT_XYZRGBA"},
122 {type::pointcloud::VoxelType::POINT_XYZRGBL, "type::pointcloud::POINT_XYZRGBL"},
123 {type::pointcloud::VoxelType::POINT_XYZHSV, "type::pointcloud::POINT_XYZHSV"}};
125 } // namespace conversion
126} // namespace armarx::aron::data::rw::json
std::map< T2, T1 > InvertMap(const std::map< T1, T2 > &m)
Definition Descriptor.h:36
const std::string FLOAT_TYPENAME_SLUG
Definition Data.h:54
const std::string INT_TYPENAME_SLUG
Definition Data.h:52
const std::string TIME_TYPENAME_SLUG
Definition Data.h:58
const std::string LIST_TYPENAME_SLUG
Definition Data.h:49
const std::string IMPORTANCE_SLUG
Definition Data.h:36
const std::string DOUBLE_TYPENAME_SLUG
Definition Data.h:55
const std::string NDARRAY_TYPENAME_SLUG
Definition Data.h:51
const std::string DIMENSIONS_SLUG
Definition Data.h:45
const std::string BOOL_TYPENAME_SLUG
Definition Data.h:57
const std::string STRING_TYPENAME_SLUG
Definition Data.h:56
const std::string DICT_TYPENAME_SLUG
Definition Data.h:50
const std::string LONG_TYPENAME_SLUG
Definition Data.h:53
const std::map< type::ndarray::ElementType, std::string > NDArrayType2String
Definition Data.h:83
const std::map< type::matrix::ElementType, std::string > MatrixType2String
Definition Data.h:94
const std::map< type::Maybe, std::string > Maybe2String
Definition Data.h:75
const std::map< type::quaternion::ElementType, std::string > QuaternionType2String
Definition Data.h:106
const std::map< data::Descriptor, std::string > Descriptor2String
Definition Data.h:63
const std::map< type::pointcloud::VoxelType, std::string > VoxelType2String
Definition Data.h:116
const std::map< type::image::PixelType, std::string > PixelType2String
Definition Data.h:111