24 #ifndef GOBY_MIDDLEWARE_MARSHALLING_INTERFACE_H
25 #define GOBY_MIDDLEWARE_MARSHALLING_INTERFACE_H
30 #include <type_traits>
69 auto it = e2s.find(
e);
79 auto it = s2e.find(s);
80 return it != s2e.end() ? it->second : std::stoi(s);
84 static const std::map<int, std::string> e2s;
85 static const std::map<std::string, int> s2e;
102 static_assert(std::is_void<Enable>::value,
"SerializerParserHelper must be specialized");
103 return std::vector<char>();
109 static_assert(std::is_void<Enable>::value,
"SerializerParserHelper must be specialized");
110 return std::string();
116 static_assert(std::is_void<Enable>::value,
"SerializerParserHelper must be specialized");
117 return std::string();
128 template <
typename CharIterator>
129 static std::shared_ptr<DataType>
parse(CharIterator bytes_begin, CharIterator bytes_end,
130 CharIterator& actual_end,
133 static_assert(std::is_void<Enable>::value,
"SerializerParserHelper must be specialized");
134 return std::shared_ptr<DataType>();
167 template <
typename DataType,
168 typename std::enable_if<std::is_same<DataType, void>::value>
::type* =
nullptr>
171 static_assert(std::is_same<DataType, void>::value,
"Null scheme instantiated");