VLink 2.0.0
A high-performance communication middleware
Loading...
Searching...
No Matches
serializer-inl.h File Reference
#include <cstring>
#include <sstream>
#include <string>
#include <utility>
#include "../base/helpers.h"
#include "../base/logger.h"
#include "../base/name_detector.h"
#include "../base/traits.h"
#include "../serializer.h"
Include dependency graph for serializer-inl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  eprosima::fastcdr::FastBuffer
class  eprosima::fastcdr::CdrVersion
class  eprosima::fastcdr::Cdr
struct  google::protobuf::Arena
struct  flatbuffers::FlatBufferBuilder
struct  flatbuffers::Table
struct  flatbuffers::NativeTable
struct  flatbuffers::Verifier

Namespaces

namespace  eprosima
namespace  eprosima::fastcdr
namespace  google
namespace  google::protobuf
namespace  flatbuffers

Macros

#define FASTCDR_VERSION_MAJOR   1

Functions

constexpr bool vlink::Serializer::is_supported (Type type) noexcept
 Returns true when type identifies a supported serializer.
template<typename T>
constexpr Type vlink::Serializer::get_type_of () noexcept
 Deduces the Type enumerator for T at compile time.
template<Type TypeT, typename T>
std::string vlink::Serializer::get_serialized_type () noexcept
 Returns the serialisation type name string for T with explicit TypeT.
template<typename T>
std::string vlink::Serializer::get_serialized_type () noexcept
 Returns the serialisation type name string for T (type auto-detected).
template<Type TypeT, typename T>
size_t vlink::Serializer::get_serialized_size (const T &src) noexcept
 Returns the exact serialised byte size for a given src value.
template<typename T>
size_t vlink::Serializer::get_serialized_size (const T &src) noexcept
 Returns the serialized byte size (type auto-detected).
template<Type TypeT, typename T>
bool vlink::Serializer::serialize (const T &src, Bytes &des, TransportType transport, uint8_t offset)
 Serializes src into des with explicit type and transport hints.
template<typename T>
bool vlink::Serializer::serialize (const T &src, Bytes &des)
 Serializes src into des (type and transport auto-detected).
template<Type TypeT, typename T>
bool vlink::Serializer::deserialize (const Bytes &src, T &des, TransportType transport)
 Deserializes src bytes into des with explicit type and transport hints.
template<typename T>
bool vlink::Serializer::deserialize (const Bytes &src, T &des)
 Deserializes src bytes into des (type and transport auto-detected).
template<typename SrcT, typename DesT>
bool vlink::Serializer::convert (const SrcT &src, DesT &des)
 Converts between two types where at least one is Bytes.
template<typename T>
constexpr auto & vlink::Serializer::deref (const T &t) noexcept
 Dereferences a value, unwrapping shared_ptr if necessary.
template<typename T>
constexpr bool vlink::Serializer::is_bytes_type () noexcept
 Returns true if T is exactly Bytes.
template<typename T>
constexpr bool vlink::Serializer::is_dynamic_type () noexcept
 Returns true if T is a VLink dynamic data type.
template<typename T>
constexpr bool vlink::Serializer::is_cdr_type () noexcept
 Returns true if T is a FastDDS CDR-serialisable type.
template<typename T>
constexpr bool vlink::Serializer::is_proto_type () noexcept
 Returns true if T is a Protobuf message value type.
template<typename T>
constexpr bool vlink::Serializer::is_proto_ptr_type () noexcept
 Returns true if T is a raw pointer to a Protobuf message.
template<typename T>
constexpr bool vlink::Serializer::is_flat_table_type () noexcept
 Returns true if T is a FlatBuffers NativeTable type.
template<typename T>
constexpr bool vlink::Serializer::is_flat_builder_type () noexcept
 Returns true if T is a FlatBuffers builder type.
template<typename T>
constexpr bool vlink::Serializer::is_flat_ptr_type () noexcept
 Returns true if T is a raw pointer to a flatbuffers::Table.
template<typename T>
constexpr bool vlink::Serializer::is_custom_type () noexcept
 Returns true if T provides custom operator>> / operator<<.
template<typename T>
constexpr bool vlink::Serializer::is_string_type () noexcept
 Returns true if T is std::string.
template<typename T>
constexpr bool vlink::Serializer::is_chars_type () noexcept
 Returns true if T is constructible from std::string (but is not std::string).
template<typename T>
constexpr bool vlink::Serializer::is_stream_type () noexcept
 Returns true if T supports both operator<< and operator>> with std::stringstream.
template<typename T>
constexpr bool vlink::Serializer::is_standard_type () noexcept
 Returns true if T is a trivial standard-layout value type (POD).
template<typename T>
constexpr bool vlink::Serializer::is_standard_ptr_type () noexcept
 Returns true if T is a pointer to a trivial standard-layout type.

Macro Definition Documentation

◆ FASTCDR_VERSION_MAJOR

#define FASTCDR_VERSION_MAJOR   1