Goby3
3.1.5a
2024.05.23
|
Class for parsing and serializing a given marshalling scheme. Must be specialized for a particular scheme and/or DataType. More...
#include <goby/middleware/marshalling/interface.h>
Static Public Member Functions | |
static std::vector< char > | serialize (const DataType &) |
Given data, produce a vector of bytes. More... | |
static std::string | type_name () |
The marshalling scheme specific string name for this type. More... | |
static std::string | type_name (const DataType &) |
The marshalling scheme specific string name for this type, given a instantiation of the type (useful for specializations that can handle multiple types using runtime introspection) More... | |
template<typename CharIterator > | |
static std::shared_ptr< DataType > | parse (CharIterator bytes_begin, CharIterator bytes_end, CharIterator &actual_end, const std::string &type=type_name()) |
Given a beginning and end iterator to bytes, parse the data and return it. More... | |
Class for parsing and serializing a given marshalling scheme. Must be specialized for a particular scheme and/or DataType.
DataType | data type that the specialization can handle |
scheme | scheme that the specialization can handle |
Enable | SFINAE enable/disable type using type_traits for specializaing this struct |
Definition at line 97 of file interface.h.
|
inlinestatic |
Given a beginning and end iterator to bytes, parse the data and return it.
CharIterator | an iterator to a container of bytes (char), e.g. std::vector<char>::iterator, or std::string::iterator |
bytes_begin | Iterator to the beginning of a container of bytes |
bytes_end | Iterator to the end of a container of bytes |
actual_end | Will be set to the actual end of parsing by this specialization (useful for byte streams that are concatenated, e.g. DCCL) |
type | Type name as string. If type_name() can be defined without parameters, the default value should be set, otherwise omit it (for dynamic types like google::protobuf::Message) |
Definition at line 129 of file interface.h.
|
inlinestatic |
Given data, produce a vector of bytes.
Definition at line 100 of file interface.h.
|
inlinestatic |
The marshalling scheme specific string name for this type.
Definition at line 107 of file interface.h.
|
inlinestatic |
The marshalling scheme specific string name for this type, given a instantiation of the type (useful for specializations that can handle multiple types using runtime introspection)
Definition at line 114 of file interface.h.