Safe DDS
eprosima::safedds::datacentric::ITypeSupport< T > Class Template Referenceabstract

ITypeSupport interface. More...

#include <ITypeSupport.hpp>

Public Member Functions

virtual size_t max_serialized_size () const noexcept=0
 get the maximum serialized size of the type. More...
 
virtual size_t serialized_size (const T &sample) const noexcept=0
 get the serialized size of the type. More...
 
virtual ReturnCode serialize (const T &sample, memory::IByteArrayView &buffer) const noexcept=0
 serialize the type. More...
 
virtual ReturnCode deserialize (const memory::IConstByteArrayView &buffer, T &sample) const noexcept=0
 deserialize the type. More...
 
virtual KeyHash get_key (const T &sample) const noexcept=0
 get the key of the type. More...
 
virtual KeyHash get_key (const memory::IConstByteArrayView &buffer, const protocol::PayloadKind &payload_kind) const noexcept=0
 get the key of the serialized type. More...
 

Protected Member Functions

 ~ITypeSupport () noexcept=default
 Protected destructor ownership defined on creation.
 
 ITypeSupport () noexcept=default
 Default creation.
 
 ITypeSupport (const ITypeSupport &) noexcept=delete
 Copy deleted.
 
 ITypeSupport (ITypeSupport &&) noexcept=delete
 Movement deleted.
 
ITypeSupportoperator= (const ITypeSupport &) noexcept=delete
 Copy operator deleted.
 
ITypeSupportoperator= (ITypeSupport &&) noexcept=delete
 Movement operator deleted.
 

Detailed Description

template<class T>
class eprosima::safedds::datacentric::ITypeSupport< T >

ITypeSupport interface.

Member Function Documentation

◆ deserialize()

template<class T >
virtual ReturnCode eprosima::safedds::datacentric::ITypeSupport< T >::deserialize ( const memory::IConstByteArrayView buffer,
T &  sample 
) const
pure virtualnoexcept

deserialize the type.

Parameters
[in]bufferbuffer.
[out]samplesample.
Returns
ReturnCode.

◆ get_key() [1/2]

template<class T >
virtual KeyHash eprosima::safedds::datacentric::ITypeSupport< T >::get_key ( const memory::IConstByteArrayView buffer,
const protocol::PayloadKind &  payload_kind 
) const
pure virtualnoexcept

get the key of the serialized type.

Parameters
[in]bufferbuffer.
[in]payload_kindpayload kind.
Returns
KeyHash.

◆ get_key() [2/2]

template<class T >
virtual KeyHash eprosima::safedds::datacentric::ITypeSupport< T >::get_key ( const T &  sample) const
pure virtualnoexcept

get the key of the type.

Parameters
[in]samplesample.
Returns
KeyHash.

◆ max_serialized_size()

template<class T >
virtual size_t eprosima::safedds::datacentric::ITypeSupport< T >::max_serialized_size ( ) const
pure virtualnoexcept

get the maximum serialized size of the type.

Returns
size_t.

◆ serialize()

template<class T >
virtual ReturnCode eprosima::safedds::datacentric::ITypeSupport< T >::serialize ( const T &  sample,
memory::IByteArrayView buffer 
) const
pure virtualnoexcept

serialize the type.

Parameters
[in]samplesample.
[in]bufferbuffer.
Returns
ReturnCode.

◆ serialized_size()

template<class T >
virtual size_t eprosima::safedds::datacentric::ITypeSupport< T >::serialized_size ( const T &  sample) const
pure virtualnoexcept

get the serialized size of the type.

Parameters
[in]samplesample.
Returns
size_t.

The documentation for this class was generated from the following file: