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 VERSION_SLUG = "_ARON_VERSION";
37
38 const std::string KEY_SLUG = "_ARON_KEY";
39 const std::string VALUE_SLUG = "_ARON_VALUE";
40 const std::string MEMBERS_SLUG = "_ARON_MEMBERS";
41 const std::string ELEMENTS_SLUG = "_ARON_ELEMENTS";
42
43 const std::string NAME_SLUG = "_ARON_NAME";
44 const std::string DIMENSIONS_SLUG = "_ARON_DIMESIONS";
45 const std::string DATA_SLUG = "_ARON_DATA";
46 const std::string USED_TYPE_SLUG = "_ARON_USED_TYPE";
47
48 const std::string LIST_TYPENAME_SLUG = "_ARON_LIST";
49 const std::string DICT_TYPENAME_SLUG = "_ARON_DICT";
50 const std::string NDARRAY_TYPENAME_SLUG = "_ARON_NDARRAY";
51 const std::string INT_TYPENAME_SLUG = "_ARON_INT";
52 const std::string LONG_TYPENAME_SLUG = "_ARON_LONG";
53 const std::string FLOAT_TYPENAME_SLUG = "_ARON_FLOAT";
54 const std::string DOUBLE_TYPENAME_SLUG = "_ARON_DOUBLE";
55 const std::string STRING_TYPENAME_SLUG = "_ARON_STRING";
56 const std::string BOOL_TYPENAME_SLUG = "_ARON_BOOL";
57 const std::string TIME_TYPENAME_SLUG = "_ARON_TIME";
58 } // namespace constantes
59
60 namespace conversion
61 {
73
74 const std::map<type::Maybe, std::string> Maybe2String = {
75 {type::Maybe::NONE, "type::maybe::NONE"},
76 {type::Maybe::OPTIONAL, "type::maybe::OPTIONAL"},
77 {type::Maybe::RAW_PTR, "type::maybe::RAW_PTR"},
78 {type::Maybe::SHARED_PTR, "type::maybe::SHARED_PTR"},
79 {type::Maybe::UNIQUE_PTR, "type::maybe::UNIQUE_PTR"}};
81
82 const std::map<type::ndarray::ElementType, std::string> NDArrayType2String = {
83 {type::ndarray::ElementType::INT8, "type::ndarray::INT8"},
84 {type::ndarray::ElementType::INT16, "type::ndarray::INT16"},
85 {type::ndarray::ElementType::INT32, "type::ndarray::INT32"},
86 {type::ndarray::ElementType::UINT8, "type::ndarray::UINT8"},
87 {type::ndarray::ElementType::UINT16, "type::ndarray::UINT16"},
88 {type::ndarray::ElementType::UINT32, "type::ndarray::UINT32"},
89 {type::ndarray::ElementType::FLOAT32, "type::ndarray::FLOAT32"},
90 {type::ndarray::ElementType::FLOAT64, "type::ndarray::FLOAT64"}};
92
93 const std::map<type::matrix::ElementType, std::string> MatrixType2String = {
94 {type::matrix::ElementType::UINT8, "type::matrix::UINT8"},
95 {type::matrix::ElementType::UINT16, "type::matrix::UINT16"},
96 {type::matrix::ElementType::UINT32, "type::matrix::UINT32"},
97 {type::matrix::ElementType::INT8, "type::matrix::INT8"},
98 {type::matrix::ElementType::INT16, "type::matrix::INT16"},
99 {type::matrix::ElementType::INT32, "type::matrix::INT32"},
100 {type::matrix::ElementType::INT64, "type::matrix::INT64"},
101 {type::matrix::ElementType::FLOAT32, "type::matrix::FLOAT32"},
102 {type::matrix::ElementType::FLOAT64, "type::matrix::FLOAT64"}};
104
105 const std::map<type::quaternion::ElementType, std::string> QuaternionType2String = {
106 {type::quaternion::ElementType::FLOAT32, "type::quaternion::FLOAT32"},
107 {type::quaternion::ElementType::FLOAT64, "type::quaternion::FLOAT64"}};
109
110 const std::map<type::image::PixelType, std::string> PixelType2String = {
111 {type::image::PixelType::RGB24, "type::image::RGB24"},
112 {type::image::PixelType::DEPTH32, "type::image::DEPTH32"}};
114
115 const std::map<type::pointcloud::VoxelType, std::string> VoxelType2String = {
116 {type::pointcloud::VoxelType::POINT_XYZ, "type::pointcloud::POINT_XYZ"},
117 {type::pointcloud::VoxelType::POINT_XYZI, "type::pointcloud::POINT_XYZI"},
118 {type::pointcloud::VoxelType::POINT_XYZL, "type::pointcloud::POINT_XYZL"},
119 {type::pointcloud::VoxelType::POINT_XYZRGB, "type::pointcloud::POINT_XYZRGB"},
120 {type::pointcloud::VoxelType::POINT_XYZRGBA, "type::pointcloud::POINT_XYZRGBA"},
121 {type::pointcloud::VoxelType::POINT_XYZRGBL, "type::pointcloud::POINT_XYZRGBL"},
122 {type::pointcloud::VoxelType::POINT_XYZHSV, "type::pointcloud::POINT_XYZHSV"}};
124 } // namespace conversion
125} // 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:53
const std::string INT_TYPENAME_SLUG
Definition Data.h:51
const std::string TIME_TYPENAME_SLUG
Definition Data.h:57
const std::string LIST_TYPENAME_SLUG
Definition Data.h:48
const std::string DOUBLE_TYPENAME_SLUG
Definition Data.h:54
const std::string NDARRAY_TYPENAME_SLUG
Definition Data.h:50
const std::string DIMENSIONS_SLUG
Definition Data.h:44
const std::string BOOL_TYPENAME_SLUG
Definition Data.h:56
const std::string STRING_TYPENAME_SLUG
Definition Data.h:55
const std::string DICT_TYPENAME_SLUG
Definition Data.h:49
const std::string LONG_TYPENAME_SLUG
Definition Data.h:52
const std::map< type::ndarray::ElementType, std::string > NDArrayType2String
Definition Data.h:82
const std::map< type::matrix::ElementType, std::string > MatrixType2String
Definition Data.h:93
const std::map< type::Maybe, std::string > Maybe2String
Definition Data.h:74
const std::map< type::quaternion::ElementType, std::string > QuaternionType2String
Definition Data.h:105
const std::map< data::Descriptor, std::string > Descriptor2String
Definition Data.h:62
const std::map< type::pointcloud::VoxelType, std::string > VoxelType2String
Definition Data.h:115
const std::map< type::image::PixelType, std::string > PixelType2String
Definition Data.h:110