Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
serialization_extensions.h
Go to the documentation of this file.
1
25#ifndef TESSERACT_COMMON_SERIALIZATION_EXTENSIONS_H
26#define TESSERACT_COMMON_SERIALIZATION_EXTENSIONS_H
27
30#include <boost/mpl/string.hpp>
32
34
35CREATE_MEMBER_CHECK(extension_type);
36
37namespace tesseract_common
38{
39namespace serialization::xml
40{
41template <class T>
43{
44 template <class U>
46 {
47 using extension_type = typename U::extenstion;
48 };
49
50 using extension_type = typename boost::mpl::
51 eval_if<has_member_extension_type<T>, traits_class_extension<T>, boost::mpl::string<'t', 'r', 's', 'x'>>::type;
52
53 static constexpr const char* value = boost::mpl::c_str<extension::extension_type>::value;
54};
55} // namespace serialization::xml
56
57namespace serialization::binary
58{
59template <class T>
61{
62 template <class U>
64 {
65 using extension_type = typename U::extenstion;
66 };
67
68 using extension_type = typename boost::mpl::
69 eval_if<has_member_extension_type<T>, traits_class_extension<T>, boost::mpl::string<'t', 'r', 's', 'b'>>::type;
70
71 static constexpr const char* value = boost::mpl::c_str<extension::extension_type>::value;
72};
73} // namespace serialization::binary
74} // namespace tesseract_common
75
82#define TESSERACT_CLASS_EXTENSION(T, X, B) \
83 namespace tesseract_common \
84 { \
85 namespace serialization::xml \
86 { \
87 template <> \
88 struct extension<T> \
89 { \
90 static constexpr const char* value = X; \
91 }; \
92 } \
93 namespace serialization::binary \
94 { \
95 template <> \
96 struct extension<T> \
97 { \
98 static constexpr const char* value = B; \
99 }; \
100 } \
101 }
102
103#endif // TESSERACT_COMMON_SERIALIZATION_EXTENSIONS_H
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: allowed_collision_matrix.h:16
#define CREATE_MEMBER_CHECK(member)
Check for member x in a given class. Could be var, func, class, union, or enum:
Definition: sfinae_utils.h:68
typename U::extenstion extension_type
Definition: serialization_extensions.h:65
Definition: serialization_extensions.h:61
typename boost::mpl::eval_if< has_member_extension_type< T >, traits_class_extension< T >, boost::mpl::string< 't', 'r', 's', 'b'> >::type extension_type
Definition: serialization_extensions.h:69
static constexpr const char * value
Definition: serialization_extensions.h:71
typename U::extenstion extension_type
Definition: serialization_extensions.h:47
Definition: serialization_extensions.h:43
static constexpr const char * value
Definition: serialization_extensions.h:53
typename boost::mpl::eval_if< has_member_extension_type< T >, traits_class_extension< T >, boost::mpl::string< 't', 'r', 's', 'x'> >::type extension_type
Definition: serialization_extensions.h:51
mCollisionCheckConfig contact_request type
Definition: tesseract_environment_collision.cpp:103