Fast CDR  Version 1.0.23
Fast CDR
Cdr Class Reference

This class offers an interface to serialize/deserialize some basic types using CDR protocol inside an eprosima::fastcdr::FastBuffer. More...

#include <Cdr.h>

Classes

class  state
 This class stores the current state of a CDR serialization. More...
 

Public Types

enum  CdrType { CORBA_CDR , DDS_CDR }
 This enumeration represents the two kinds of CDR serialization supported by eprosima::fastcdr::CDR. More...
 
enum  DDSCdrPlFlag { DDS_CDR_WITHOUT_PL = 0x0 , DDS_CDR_WITH_PL = 0x2 }
 This enumeration represents the two posible values of the flag that points if the content is a parameter list (only in DDS CDR). More...
 
enum  Endianness { BIG_ENDIANNESS = 0x0 , LITTLE_ENDIANNESS = 0x1 }
 This enumeration represents endianness types. More...
 

Public Member Functions

 Cdr (FastBuffer &cdrBuffer, const Endianness endianness=DEFAULT_ENDIAN, const CdrType cdrType=CORBA_CDR)
 This constructor creates an eprosima::fastcdr::Cdr object that can serialize/deserialize the assigned buffer. More...
 
Cdrread_encapsulation ()
 This function reads the encapsulation of the CDR stream. More...
 
Cdrserialize_encapsulation ()
 This function writes the encapsulation of the CDR stream. More...
 
DDSCdrPlFlag getDDSCdrPlFlag () const
 This function returns the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR. More...
 
void setDDSCdrPlFlag (DDSCdrPlFlag plFlag)
 This function sets the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR. More...
 
uint16_t getDDSCdrOptions () const
 This function returns the option flags when the CDR type is eprosima::fastcdr::DDS_CDR. More...
 
void setDDSCdrOptions (uint16_t options)
 This function sets the option flags when the CDR type is eprosima::fastcdr::DDS_CDR. More...
 
void changeEndianness (Endianness endianness)
 This function sets the current endianness used by the CDR type. More...
 
Endianness endianness () const
 This function returns the current endianness used by the CDR type. More...
 
bool jump (size_t numBytes)
 This function skips a number of bytes in the CDR stream buffer. More...
 
void reset ()
 This function resets the current position in the buffer to the beginning. More...
 
char * getBufferPointer ()
 This function returns the pointer to the current used buffer. More...
 
char * getCurrentPosition ()
 This function returns the current position in the CDR stream. More...
 
size_t getSerializedDataLength () const
 This function returns the length of the serialized data inside the stream. More...
 
state getState ()
 This function returns the current state of the CDR serialization process. More...
 
void setState (state &state)
 This function sets a previous state of the CDR serialization process;. More...
 
bool moveAlignmentForward (size_t numBytes)
 This function moves the alignment forward. More...
 
void resetAlignment ()
 This function resets the alignment to the current position in the buffer. More...
 
Cdroperator<< (const uint8_t octet_t)
 This operator serializes an octet. More...
 
Cdroperator<< (const char char_t)
 This operator serializes a character. More...
 
Cdroperator<< (const int8_t int8)
 This operator serializes a int8_t. More...
 
Cdroperator<< (const uint16_t ushort_t)
 This operator serializes an unsigned short. More...
 
Cdroperator<< (const int16_t short_t)
 This operator serializes a short. More...
 
Cdroperator<< (const uint32_t ulong_t)
 This operator serializes an unsigned long. More...
 
Cdroperator<< (const int32_t long_t)
 This operator serializes a long. More...
 
Cdroperator<< (const wchar_t wchar)
 This operator serializes a wide-char. More...
 
Cdroperator<< (const uint64_t ulonglong_t)
 This operator serializes an unsigned long long. More...
 
Cdroperator<< (const int64_t longlong_t)
 This operator serializes a long long. More...
 
Cdroperator<< (const float float_t)
 This operator serializes a float. More...
 
Cdroperator<< (const double double_t)
 This operator serializes a double. More...
 
Cdroperator<< (const long double ldouble_t)
 This operator serializes a long double. More...
 
Cdroperator<< (const bool bool_t)
 This operator serializes a boolean. More...
 
Cdroperator<< (const char *string_t)
 This operator serializes a null-terminated c-string. More...
 
Cdroperator<< (char *string_t)
 This operator serializes a null-terminated c-string. More...
 
Cdroperator<< (const std::string &string_t)
 This operator serializes a string. More...
 
Cdroperator<< (const std::wstring &string_t)
 This operator serializes a wstring. More...
 
template<class _T >
Cdroperator<< (const std::vector< _T > &vector_t)
 This operator template is used to serialize sequences. More...
 
template<class _K , class _T >
Cdroperator<< (const std::map< _K, _T > &map_t)
 This operator template is used to serialize maps. More...
 
template<class _T >
Cdroperator<< (const _T &type_t)
 This operator template is used to serialize any other non-basic type. More...
 
Cdroperator>> (uint8_t &octet_t)
 This operator deserializes an octet. More...
 
Cdroperator>> (char &char_t)
 This operator deserializes a character. More...
 
Cdroperator>> (int8_t &int8)
 This operator deserializes a int8_t. More...
 
Cdroperator>> (uint16_t &ushort_t)
 This operator deserializes an unsigned short. More...
 
Cdroperator>> (int16_t &short_t)
 This operator deserializes a short. More...
 
Cdroperator>> (uint32_t &ulong_t)
 This operator deserializes an unsigned long. More...
 
Cdroperator>> (int32_t &long_t)
 This operator deserializes a long. More...
 
Cdroperator>> (wchar_t &wchar)
 This operator deserializes a wide-char. More...
 
Cdroperator>> (uint64_t &ulonglong_t)
 This operator deserializes a unsigned long long. More...
 
Cdroperator>> (int64_t &longlong_t)
 This operator deserializes a long long. More...
 
Cdroperator>> (float &float_t)
 This operator deserializes a float. More...
 
Cdroperator>> (double &double_t)
 This operator deserializes a double. More...
 
Cdroperator>> (long double &ldouble_t)
 This operator deserializes a long double. More...
 
Cdroperator>> (bool &bool_t)
 This operator deserializes a boolean. More...
 
Cdroperator>> (char *&string_t)
 This operator deserializes a null-terminated c-string. More...
 
Cdroperator>> (std::string &string_t)
 This operator deserializes a string. More...
 
Cdroperator>> (std::wstring &string_t)
 This operator deserializes a string. More...
 
template<class _T >
Cdroperator>> (std::vector< _T > &vector_t)
 This operator template is used to deserialize sequences. More...
 
template<class _K , class _T >
Cdroperator>> (std::map< _K, _T > &map_t)
 This operator template is used to deserialize maps. More...
 
template<class _T >
Cdroperator>> (_T &type_t)
 This operator template is used to deserialize any other non-basic type. More...
 
Cdrserialize (const uint8_t octet_t)
 This function serializes an octet. More...
 
Cdrserialize (const uint8_t octet_t, Endianness endianness)
 This function serializes an octet with a different endianness. More...
 
Cdrserialize (const char char_t)
 This function serializes a character. More...
 
Cdrserialize (const char char_t, Endianness endianness)
 This function serializes a character with a different endianness. More...
 
Cdrserialize (const int8_t int8)
 This function serializes an int8_t. More...
 
Cdrserialize (const int8_t int8, Endianness endianness)
 This function serializes an int8_t with a different endianness. More...
 
Cdrserialize (const uint16_t ushort_t)
 This function serializes an unsigned short. More...
 
Cdrserialize (const uint16_t ushort_t, Endianness endianness)
 This function serializes an unsigned short with a different endianness. More...
 
Cdrserialize (const int16_t short_t)
 This function serializes a short. More...
 
Cdrserialize (const int16_t short_t, Endianness endianness)
 This function serializes a short with a different endianness. More...
 
Cdrserialize (const uint32_t ulong_t)
 This function serializes an unsigned long. More...
 
Cdrserialize (const uint32_t ulong_t, Endianness endianness)
 This function serializes an unsigned long with a different endianness. More...
 
Cdrserialize (const int32_t long_t)
 This function serializes a long. More...
 
Cdrserialize (const int32_t long_t, Endianness endianness)
 This function serializes a long with a different endianness. More...
 
Cdrserialize (const wchar_t wchar)
 This function serializes a wide-char. More...
 
Cdrserialize (const wchar_t wchar, Endianness endianness)
 This function serializes a wide-char with a different endianness. More...
 
Cdrserialize (const uint64_t ulonglong_t)
 This function serializes an unsigned long long. More...
 
Cdrserialize (const uint64_t ulonglong_t, Endianness endianness)
 This function serializes an unsigned long long with a different endianness. More...
 
Cdrserialize (const int64_t longlong_t)
 This function serializes a long long. More...
 
Cdrserialize (const int64_t longlong_t, Endianness endianness)
 This function serializes a long long with a different endianness. More...
 
Cdrserialize (const float float_t)
 This function serializes a float. More...
 
Cdrserialize (const float float_t, Endianness endianness)
 This function serializes a float with a different endianness. More...
 
Cdrserialize (const double double_t)
 This function serializes a double. More...
 
Cdrserialize (const double double_t, Endianness endianness)
 This function serializes a double with a different endianness. More...
 
Cdrserialize (const long double ldouble_t)
 This function serializes a long double. More...
 
Cdrserialize (const long double ldouble_t, Endianness endianness)
 This function serializes a long double with a different endianness. More...
 
Cdrserialize (const bool bool_t)
 This function serializes a boolean. More...
 
Cdrserialize (const bool bool_t, Endianness endianness)
 This function serializes a boolean with a different endianness. More...
 
Cdrserialize (char *string_t)
 This function serializes a string. More...
 
Cdrserialize (const char *string_t)
 This function serializes a string. More...
 
Cdrserialize (const wchar_t *string_t)
 This function serializes a wstring. More...
 
Cdrserialize (const char *string_t, Endianness endianness)
 This function serializes a string with a different endianness. More...
 
Cdrserialize (const wchar_t *string_t, Endianness endianness)
 This function serializes a wstring with a different endianness. More...
 
Cdrserialize (const std::string &string_t)
 This function serializes a std::string. More...
 
Cdrserialize (const std::wstring &string_t)
 This function serializes a std::wstring. More...
 
Cdrserialize (const std::string &string_t, Endianness endianness)
 This function serializes a std::string with a different endianness. More...
 
template<class _T >
Cdrserialize (const std::vector< _T > &vector_t)
 This function template serializes a sequence. More...
 
template<class _K , class _T >
Cdrserialize (const std::map< _K, _T > &map_t)
 This function template serializes a map. More...
 
template<class _T >
Cdrserialize (const std::vector< _T > &vector_t, Endianness endianness)
 This function template serializes a sequence with a different endianness. More...
 
template<class _T >
Cdrserialize (const _T &type_t)
 This function template serializes a non-basic object. More...
 
CdrserializeArray (const uint8_t *octet_t, size_t numElements)
 This function serializes an array of octets. More...
 
CdrserializeArray (const uint8_t *octet_t, size_t numElements, Endianness endianness)
 This function serializes an array of octets with a different endianness. More...
 
CdrserializeArray (const char *char_t, size_t numElements)
 This function serializes an array of characters. More...
 
CdrserializeArray (const char *char_t, size_t numElements, Endianness endianness)
 This function serializes an array of characters with a different endianness. More...
 
CdrserializeArray (const int8_t *int8, size_t numElements)
 This function serializes an array of int8_t. More...
 
CdrserializeArray (const int8_t *int8, size_t numElements, Endianness endianness)
 This function serializes an array of int8_t with a different endianness. More...
 
CdrserializeArray (const uint16_t *ushort_t, size_t numElements)
 This function serializes an array of unsigned shorts. More...
 
CdrserializeArray (const uint16_t *ushort_t, size_t numElements, Endianness endianness)
 This function serializes an array of unsigned shorts with a different endianness. More...
 
CdrserializeArray (const int16_t *short_t, size_t numElements)
 This function serializes an array of shorts. More...
 
CdrserializeArray (const int16_t *short_t, size_t numElements, Endianness endianness)
 This function serializes an array of shorts with a different endianness. More...
 
CdrserializeArray (const uint32_t *ulong_t, size_t numElements)
 This function serializes an array of unsigned longs. More...
 
CdrserializeArray (const uint32_t *ulong_t, size_t numElements, Endianness endianness)
 This function serializes an array of unsigned longs with a different endianness. More...
 
CdrserializeArray (const int32_t *long_t, size_t numElements)
 This function serializes an array of longs. More...
 
CdrserializeArray (const int32_t *long_t, size_t numElements, Endianness endianness)
 This function serializes an array of longs with a different endianness. More...
 
CdrserializeArray (const wchar_t *wchar, size_t numElements)
 This function serializes an array of wide-chars. More...
 
CdrserializeArray (const wchar_t *wchar, size_t numElements, Endianness endianness)
 This function serializes an array of wide-chars with a different endianness. More...
 
CdrserializeArray (const uint64_t *ulonglong_t, size_t numElements)
 This function serializes an array of unsigned long longs. More...
 
CdrserializeArray (const uint64_t *ulonglong_t, size_t numElements, Endianness endianness)
 This function serializes an array of unsigned long longs with a different endianness. More...
 
CdrserializeArray (const int64_t *longlong_t, size_t numElements)
 This function serializes an array of long longs. More...
 
CdrserializeArray (const int64_t *longlong_t, size_t numElements, Endianness endianness)
 This function serializes an array of long longs with a different endianness. More...
 
CdrserializeArray (const float *float_t, size_t numElements)
 This function serializes an array of floats. More...
 
CdrserializeArray (const float *float_t, size_t numElements, Endianness endianness)
 This function serializes an array of floats with a different endianness. More...
 
CdrserializeArray (const double *double_t, size_t numElements)
 This function serializes an array of doubles. More...
 
CdrserializeArray (const double *double_t, size_t numElements, Endianness endianness)
 This function serializes an array of doubles with a different endianness. More...
 
CdrserializeArray (const long double *ldouble_t, size_t numElements)
 This function serializes an array of long doubles. More...
 
CdrserializeArray (const long double *ldouble_t, size_t numElements, Endianness endianness)
 This function serializes an array of long doubles with a different endianness. More...
 
CdrserializeArray (const bool *bool_t, size_t numElements)
 This function serializes an array of booleans. More...
 
CdrserializeArray (const bool *bool_t, size_t numElements, Endianness endianness)
 This function serializes an array of booleans with a different endianness. More...
 
CdrserializeArray (const std::string *string_t, size_t numElements)
 This function serializes an array of strings. More...
 
CdrserializeArray (const std::wstring *string_t, size_t numElements)
 This function serializes an array of wide-strings. More...
 
CdrserializeArray (const std::string *string_t, size_t numElements, Endianness endianness)
 This function serializes an array of strings with a different endianness. More...
 
CdrserializeArray (const std::wstring *string_t, size_t numElements, Endianness endianness)
 This function serializes an array of wide-strings with a different endianness. More...
 
template<class _T >
CdrserializeArray (const std::vector< _T > *vector_t, size_t numElements)
 This function template serializes an array of sequences of objects. More...
 
template<class _T >
CdrserializeArray (const _T *type_t, size_t numElements)
 This function template serializes an array of non-basic objects. More...
 
template<class _T >
CdrserializeArray (const _T *type_t, size_t numElements, Endianness endianness)
 This function template serializes an array of non-basic objects with a different endianness. More...
 
template<class _T >
CdrserializeSequence (const _T *sequence_t, size_t numElements)
 This function template serializes a raw sequence. More...
 
template<class _T >
CdrserializeSequence (const _T *sequence_t, size_t numElements, Endianness endianness)
 This function template serializes a raw sequence with a different endianness. More...
 
Cdrdeserialize (uint8_t &octet_t)
 This function deserializes an octet. More...
 
Cdrdeserialize (uint8_t &octet_t, Endianness endianness)
 This function deserializes an octet with a different endianness. More...
 
Cdrdeserialize (char &char_t)
 This function deserializes a character. More...
 
Cdrdeserialize (char &char_t, Endianness endianness)
 This function deserializes a character with a different endianness. More...
 
Cdrdeserialize (int8_t &int8)
 This function deserializes an int8_t. More...
 
Cdrdeserialize (int8_t &int8, Endianness endianness)
 This function deserializes an int8_t with a different endianness. More...
 
Cdrdeserialize (uint16_t &ushort_t)
 This function deserializes an unsigned short. More...
 
Cdrdeserialize (uint16_t &ushort_t, Endianness endianness)
 This function deserializes an unsigned short with a different endianness. More...
 
Cdrdeserialize (int16_t &short_t)
 This function deserializes a short. More...
 
Cdrdeserialize (int16_t &short_t, Endianness endianness)
 This function deserializes a short with a different endianness. More...
 
Cdrdeserialize (uint32_t &ulong_t)
 This function deserializes an unsigned long. More...
 
Cdrdeserialize (uint32_t &ulong_t, Endianness endianness)
 This function deserializes an unsigned long with a different endianness. More...
 
Cdrdeserialize (int32_t &long_t)
 This function deserializes a long. More...
 
Cdrdeserialize (int32_t &long_t, Endianness endianness)
 This function deserializes a long with a different endianness. More...
 
Cdrdeserialize (wchar_t &wchar)
 This function deserializes a wide-char. More...
 
Cdrdeserialize (wchar_t &wchar, Endianness endianness)
 This function deserializes a wide-char with a different endianness. More...
 
Cdrdeserialize (uint64_t &ulonglong_t)
 This function deserializes an unsigned long long. More...
 
Cdrdeserialize (uint64_t &ulonglong_t, Endianness endianness)
 This function deserializes an unsigned long long with a different endianness. More...
 
Cdrdeserialize (int64_t &longlong_t)
 This function deserializes a long long. More...
 
Cdrdeserialize (int64_t &longlong_t, Endianness endianness)
 This function deserializes a long long with a different endianness. More...
 
Cdrdeserialize (float &float_t)
 This function deserializes a float. More...
 
Cdrdeserialize (float &float_t, Endianness endianness)
 This function deserializes a float with a different endianness. More...
 
Cdrdeserialize (double &double_t)
 This function deserializes a double. More...
 
Cdrdeserialize (double &double_t, Endianness endianness)
 This function deserializes a double with a different endianness. More...
 
Cdrdeserialize (long double &ldouble_t)
 This function deserializes a long double. More...
 
Cdrdeserialize (long double &ldouble_t, Endianness endianness)
 This function deserializes a long double with a different endianness. More...
 
Cdrdeserialize (bool &bool_t)
 This function deserializes a boolean. More...
 
Cdrdeserialize (bool &bool_t, Endianness endianness)
 This function deserializes a boolean with a different endianness. More...
 
Cdrdeserialize (char *&string_t)
 This function deserializes a string. More...
 
Cdrdeserialize (wchar_t *&string_t)
 This function deserializes a wide string. More...
 
Cdrdeserialize (char *&string_t, Endianness endianness)
 This function deserializes a string with a different endianness. More...
 
Cdrdeserialize (wchar_t *&string_t, Endianness endianness)
 This function deserializes a wide string with a different endianness. More...
 
Cdrdeserialize (std::string &string_t)
 This function deserializes a std::string. More...
 
Cdrdeserialize (std::wstring &string_t)
 This function deserializes a std::string. More...
 
Cdrdeserialize (std::string &string_t, Endianness endianness)
 This function deserializes a string with a different endianness. More...
 
Cdrdeserialize (std::wstring &string_t, Endianness endianness)
 This function deserializes a string with a different endianness. More...
 
template<class _T >
Cdrdeserialize (std::vector< _T > &vector_t)
 This function template deserializes a sequence. More...
 
template<class _K , class _T >
Cdrdeserialize (std::map< _K, _T > &map_t)
 This function template deserializes a map. More...
 
template<class _T >
Cdrdeserialize (std::vector< _T > &vector_t, Endianness endianness)
 This function template deserializes a sequence with a different endianness. More...
 
template<class _T >
Cdrdeserialize (_T &type_t)
 This function template deserializes a non-basic object. More...
 
CdrdeserializeArray (uint8_t *octet_t, size_t numElements)
 This function deserializes an array of octets. More...
 
CdrdeserializeArray (uint8_t *octet_t, size_t numElements, Endianness endianness)
 This function deserializes an array of octets with a different endianness. More...
 
CdrdeserializeArray (char *char_t, size_t numElements)
 This function deserializes an array of characters. More...
 
CdrdeserializeArray (char *char_t, size_t numElements, Endianness endianness)
 This function deserializes an array of characters with a different endianness. More...
 
CdrdeserializeArray (int8_t *int8, size_t numElements)
 This function deserializes an array of int8_t. More...
 
CdrdeserializeArray (int8_t *int8, size_t numElements, Endianness endianness)
 This function deserializes an array of int8_t with a different endianness. More...
 
CdrdeserializeArray (uint16_t *ushort_t, size_t numElements)
 This function deserializes an array of unsigned shorts. More...
 
CdrdeserializeArray (uint16_t *ushort_t, size_t numElements, Endianness endianness)
 This function deserializes an array of unsigned shorts with a different endianness. More...
 
CdrdeserializeArray (int16_t *short_t, size_t numElements)
 This function deserializes an array of shorts. More...
 
CdrdeserializeArray (int16_t *short_t, size_t numElements, Endianness endianness)
 This function deserializes an array of shorts with a different endianness. More...
 
CdrdeserializeArray (uint32_t *ulong_t, size_t numElements)
 This function deserializes an array of unsigned longs. More...
 
CdrdeserializeArray (uint32_t *ulong_t, size_t numElements, Endianness endianness)
 This function deserializes an array of unsigned longs with a different endianness. More...
 
CdrdeserializeArray (int32_t *long_t, size_t numElements)
 This function deserializes an array of longs. More...
 
CdrdeserializeArray (int32_t *long_t, size_t numElements, Endianness endianness)
 This function deserializes an array of longs with a different endianness. More...
 
CdrdeserializeArray (wchar_t *wchar, size_t numElements)
 This function deserializes an array of wide-chars. More...
 
CdrdeserializeArray (wchar_t *wchar, size_t numElements, Endianness endianness)
 This function deserializes an array of wide-chars with a different endianness. More...
 
CdrdeserializeArray (uint64_t *ulonglong_t, size_t numElements)
 This function deserializes an array of unsigned long longs. More...
 
CdrdeserializeArray (uint64_t *ulonglong_t, size_t numElements, Endianness endianness)
 This function deserializes an array of unsigned long longs with a different endianness. More...
 
CdrdeserializeArray (int64_t *longlong_t, size_t numElements)
 This function deserializes an array of long longs. More...
 
CdrdeserializeArray (int64_t *longlong_t, size_t numElements, Endianness endianness)
 This function deserializes an array of long longs with a different endianness. More...
 
CdrdeserializeArray (float *float_t, size_t numElements)
 This function deserializes an array of floats. More...
 
CdrdeserializeArray (float *float_t, size_t numElements, Endianness endianness)
 This function deserializes an array of floats with a different endianness. More...
 
CdrdeserializeArray (double *double_t, size_t numElements)
 This function deserializes an array of doubles. More...
 
CdrdeserializeArray (double *double_t, size_t numElements, Endianness endianness)
 This function deserializes an array of doubles with a different endianness. More...
 
CdrdeserializeArray (long double *ldouble_t, size_t numElements)
 This function deserializes an array of long doubles. More...
 
CdrdeserializeArray (long double *ldouble_t, size_t numElements, Endianness endianness)
 This function deserializes an array of long doubles with a different endianness. More...
 
CdrdeserializeArray (bool *bool_t, size_t numElements)
 This function deserializes an array of booleans. More...
 
CdrdeserializeArray (bool *bool_t, size_t numElements, Endianness endianness)
 This function deserializes an array of booleans with a different endianness. More...
 
CdrdeserializeArray (std::string *string_t, size_t numElements)
 This function deserializes an array of strings. More...
 
CdrdeserializeArray (std::wstring *string_t, size_t numElements)
 This function deserializes an array of wide-strings. More...
 
CdrdeserializeArray (std::string *string_t, size_t numElements, Endianness endianness)
 This function deserializes an array of strings with a different endianness. More...
 
CdrdeserializeArray (std::wstring *string_t, size_t numElements, Endianness endianness)
 This function deserializes an array of wide-strings with a different endianness. More...
 
template<class _T >
CdrdeserializeArray (std::vector< _T > *vector_t, size_t numElements)
 This function deserializes an array of sequences of objects. More...
 
template<class _T >
CdrdeserializeArray (_T *type_t, size_t numElements)
 This function template deserializes an array of non-basic objects. More...
 
template<class _T >
CdrdeserializeArray (_T *type_t, size_t numElements, Endianness endianness)
 This function template deserializes an array of non-basic objects with a different endianness. More...
 
template<class _T >
CdrdeserializeSequence (_T *&sequence_t, size_t &numElements)
 This function template deserializes a raw sequence. More...
 
template<class _T >
CdrdeserializeSequence (_T *&sequence_t, size_t &numElements, Endianness endianness)
 This function template deserializes a raw sequence with a different endianness. More...
 

Static Public Member Functions

static size_t alignment (size_t current_alignment, size_t dataSize)
 Get the number of bytes needed to align a position to certain data size. More...
 

Static Public Attributes

static const Endianness DEFAULT_ENDIAN
 Default endiness in the system. More...
 

Detailed Description

This class offers an interface to serialize/deserialize some basic types using CDR protocol inside an eprosima::fastcdr::FastBuffer.

Member Enumeration Documentation

◆ CdrType

enum CdrType

This enumeration represents the two kinds of CDR serialization supported by eprosima::fastcdr::CDR.

Enumerator
CORBA_CDR 

Common CORBA CDR serialization.

DDS_CDR 

DDS CDR serialization.

◆ DDSCdrPlFlag

This enumeration represents the two posible values of the flag that points if the content is a parameter list (only in DDS CDR).

Enumerator
DDS_CDR_WITHOUT_PL 

Specifies that the content is not a parameter list.

DDS_CDR_WITH_PL 

Specifies that the content is a parameter list.

◆ Endianness

enum Endianness

This enumeration represents endianness types.

Enumerator
BIG_ENDIANNESS 

Big endianness.

LITTLE_ENDIANNESS 

Little endianness.

Constructor & Destructor Documentation

◆ Cdr()

Cdr ( FastBuffer cdrBuffer,
const Endianness  endianness = DEFAULT_ENDIAN,
const CdrType  cdrType = CORBA_CDR 
)

This constructor creates an eprosima::fastcdr::Cdr object that can serialize/deserialize the assigned buffer.

Parameters
cdrBufferA reference to the buffer that contains (or will contain) the CDR representation.
endiannessThe initial endianness that will be used. The default value is the endianness of the system.
cdrTypeRepresents the type of CDR that will be used in serialization/deserialization. The default value is CORBA CDR.

Member Function Documentation

◆ alignment()

static size_t alignment ( size_t  current_alignment,
size_t  dataSize 
)
inlinestatic

Get the number of bytes needed to align a position to certain data size.

Parameters
current_alignmentPosition to be aligned.
dataSizeSize of next data to process (should be power of two).
Returns
Number of required alignment bytes.

◆ changeEndianness()

void changeEndianness ( Endianness  endianness)

This function sets the current endianness used by the CDR type.

Parameters
endiannessThe new endianness value.

◆ deserialize() [1/40]

Cdr& deserialize ( _T &  type_t)
inline

This function template deserializes a non-basic object.

Parameters
type_tThe variable that will store the object read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [2/40]

Cdr& deserialize ( bool &  bool_t)

This function deserializes a boolean.

Parameters
bool_tThe variable that will store the boolean read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize an invalid value.

◆ deserialize() [3/40]

Cdr& deserialize ( bool &  bool_t,
Endianness  endianness 
)
inline

This function deserializes a boolean with a different endianness.

Parameters
bool_tThe variable that will store the boolean read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize an invalid value.

◆ deserialize() [4/40]

Cdr& deserialize ( char &  char_t)

This function deserializes a character.

Parameters
char_tThe variable that will store the character read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [5/40]

Cdr& deserialize ( char &  char_t,
Endianness  endianness 
)
inline

This function deserializes a character with a different endianness.

Parameters
char_tThe variable that will store the character read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [6/40]

Cdr& deserialize ( char *&  string_t)

This function deserializes a string.

This function allocates memory to store the string. The user pointer will be set to point this allocated memory. The user will have to free this allocated memory using free()

Parameters
string_tThe pointer that will point to the string read from the buffer. The user will have to free the allocated memory using free()
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [7/40]

Cdr& deserialize ( char *&  string_t,
Endianness  endianness 
)

This function deserializes a string with a different endianness.

This function allocates memory to store the string. The user pointer will be set to point this allocated memory. The user will have to free this allocated memory using free()

Parameters
string_tThe pointer that will point to the string read from the buffer.
endiannessEndianness that will be used in the deserialization of this value. The user will have to free the allocated memory using free()
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [8/40]

Cdr& deserialize ( double &  double_t)

This function deserializes a double.

Parameters
double_tThe variable that will store the double read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [9/40]

Cdr& deserialize ( double &  double_t,
Endianness  endianness 
)

This function deserializes a double with a different endianness.

Parameters
double_tThe variable that will store the double read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [10/40]

Cdr& deserialize ( float &  float_t)

This function deserializes a float.

Parameters
float_tThe variable that will store the float read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [11/40]

Cdr& deserialize ( float &  float_t,
Endianness  endianness 
)

This function deserializes a float with a different endianness.

Parameters
float_tThe variable that will store the float read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [12/40]

Cdr& deserialize ( int16_t &  short_t)

This function deserializes a short.

Parameters
short_tThe variable that will store the short read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [13/40]

Cdr& deserialize ( int16_t &  short_t,
Endianness  endianness 
)

This function deserializes a short with a different endianness.

Parameters
short_tThe variable that will store the short read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [14/40]

Cdr& deserialize ( int32_t &  long_t)

This function deserializes a long.

Parameters
long_tThe variable that will store the long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [15/40]

Cdr& deserialize ( int32_t &  long_t,
Endianness  endianness 
)

This function deserializes a long with a different endianness.

Parameters
long_tThe variable that will store the long read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [16/40]

Cdr& deserialize ( int64_t &  longlong_t)

This function deserializes a long long.

Parameters
longlong_tThe variable that will store the long long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [17/40]

Cdr& deserialize ( int64_t &  longlong_t,
Endianness  endianness 
)

This function deserializes a long long with a different endianness.

Parameters
longlong_tThe variable that will store the long long read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [18/40]

Cdr& deserialize ( int8_t &  int8)
inline

This function deserializes an int8_t.

Parameters
int8The variable that will store the int8_t read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [19/40]

Cdr& deserialize ( int8_t &  int8,
Endianness  endianness 
)
inline

This function deserializes an int8_t with a different endianness.

Parameters
int8The variable that will store the int8_t read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [20/40]

Cdr& deserialize ( long double &  ldouble_t)

This function deserializes a long double.

Parameters
ldouble_tThe variable that will store the long double read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
Note
Due to internal representation differences, WIN32 and *NIX like systems are not compatible.

◆ deserialize() [21/40]

Cdr& deserialize ( long double &  ldouble_t,
Endianness  endianness 
)

This function deserializes a long double with a different endianness.

Parameters
ldouble_tThe variable that will store the long double read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
Note
Due to internal representation differences, WIN32 and *NIX like systems are not compatible.

◆ deserialize() [22/40]

Cdr& deserialize ( std::map< _K, _T > &  map_t)
inline

This function template deserializes a map.

Parameters
map_tThe variable that will store the map read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [23/40]

Cdr& deserialize ( std::string &  string_t)
inline

This function deserializes a std::string.

Parameters
string_tThe variable that will store the string read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [24/40]

Cdr& deserialize ( std::string &  string_t,
Endianness  endianness 
)
inline

This function deserializes a string with a different endianness.

Parameters
string_tThe variable that will store the string read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [25/40]

Cdr& deserialize ( std::vector< _T > &  vector_t)
inline

This function template deserializes a sequence.

Parameters
vector_tThe variable that will store the sequence read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [26/40]

Cdr& deserialize ( std::vector< _T > &  vector_t,
Endianness  endianness 
)
inline

This function template deserializes a sequence with a different endianness.

Parameters
vector_tThe variable that will store the sequence read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [27/40]

Cdr& deserialize ( std::wstring &  string_t)
inline

This function deserializes a std::string.

Parameters
string_tThe variable that will store the string read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [28/40]

Cdr& deserialize ( std::wstring &  string_t,
Endianness  endianness 
)
inline

This function deserializes a string with a different endianness.

Parameters
string_tThe variable that will store the string read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [29/40]

Cdr& deserialize ( uint16_t &  ushort_t)
inline

This function deserializes an unsigned short.

Parameters
ushort_tThe variable that will store the unsigned short read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [30/40]

Cdr& deserialize ( uint16_t &  ushort_t,
Endianness  endianness 
)
inline

This function deserializes an unsigned short with a different endianness.

Parameters
ushort_tThe variable that will store the unsigned short read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [31/40]

Cdr& deserialize ( uint32_t &  ulong_t)
inline

This function deserializes an unsigned long.

Parameters
ulong_tThe variable that will store the unsigned long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [32/40]

Cdr& deserialize ( uint32_t &  ulong_t,
Endianness  endianness 
)
inline

This function deserializes an unsigned long with a different endianness.

Parameters
ulong_tThe variable that will store the unsigned long read from the buffer..
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [33/40]

Cdr& deserialize ( uint64_t &  ulonglong_t)
inline

This function deserializes an unsigned long long.

Parameters
ulonglong_tThe variable that will store the unsigned long long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [34/40]

Cdr& deserialize ( uint64_t &  ulonglong_t,
Endianness  endianness 
)
inline

This function deserializes an unsigned long long with a different endianness.

Parameters
ulonglong_tThe variable that will store the unsigned long long read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [35/40]

Cdr& deserialize ( uint8_t &  octet_t)
inline

This function deserializes an octet.

Parameters
octet_tThe variable that will store the octet read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [36/40]

Cdr& deserialize ( uint8_t &  octet_t,
Endianness  endianness 
)
inline

This function deserializes an octet with a different endianness.

Parameters
octet_tThe variable that will store the octet read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [37/40]

Cdr& deserialize ( wchar_t &  wchar)
inline

This function deserializes a wide-char.

Parameters
wcharThe variable that will store the wide-char read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [38/40]

Cdr& deserialize ( wchar_t &  wchar,
Endianness  endianness 
)
inline

This function deserializes a wide-char with a different endianness.

Parameters
wcharThe variable that will store the wide-char read from the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [39/40]

Cdr& deserialize ( wchar_t *&  string_t)

This function deserializes a wide string.

This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. The user will have to free this allocated memory using free()

Parameters
string_tThe pointer that will point to the wide string read from the buffer. The user will have to free the allocated memory using free()
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserialize() [40/40]

Cdr& deserialize ( wchar_t *&  string_t,
Endianness  endianness 
)

This function deserializes a wide string with a different endianness.

This function allocates memory to store the wide string. The user pointer will be set to point this allocated memory. The user will have to free this allocated memory using free()

Parameters
string_tThe pointer that will point to the wide string read from the buffer.
endiannessEndianness that will be used in the deserialization of this value. The user will have to free the allocated memory using free()
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [1/35]

Cdr& deserializeArray ( _T *  type_t,
size_t  numElements 
)
inline

This function template deserializes an array of non-basic objects.

Parameters
type_tThe variable that will store the array of objects read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [2/35]

Cdr& deserializeArray ( _T *  type_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function template deserializes an array of non-basic objects with a different endianness.

Parameters
type_tThe variable that will store the array of objects read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [3/35]

Cdr& deserializeArray ( bool *  bool_t,
size_t  numElements 
)

This function deserializes an array of booleans.

Parameters
bool_tThe variable that will store the array of booleans read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [4/35]

Cdr& deserializeArray ( bool *  bool_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of booleans with a different endianness.

Parameters
bool_tThe variable that will store the array of booleans read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [5/35]

Cdr& deserializeArray ( char *  char_t,
size_t  numElements 
)

This function deserializes an array of characters.

Parameters
char_tThe variable that will store the array of characters read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [6/35]

Cdr& deserializeArray ( char *  char_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of characters with a different endianness.

Parameters
char_tThe variable that will store the array of characters read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [7/35]

Cdr& deserializeArray ( double *  double_t,
size_t  numElements 
)

This function deserializes an array of doubles.

Parameters
double_tThe variable that will store the array of doubles read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [8/35]

Cdr& deserializeArray ( double *  double_t,
size_t  numElements,
Endianness  endianness 
)

This function deserializes an array of doubles with a different endianness.

Parameters
double_tThe variable that will store the array of doubles read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [9/35]

Cdr& deserializeArray ( float *  float_t,
size_t  numElements 
)

This function deserializes an array of floats.

Parameters
float_tThe variable that will store the array of floats read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [10/35]

Cdr& deserializeArray ( float *  float_t,
size_t  numElements,
Endianness  endianness 
)

This function deserializes an array of floats with a different endianness.

Parameters
float_tThe variable that will store the array of floats read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [11/35]

Cdr& deserializeArray ( int16_t *  short_t,
size_t  numElements 
)

This function deserializes an array of shorts.

Parameters
short_tThe variable that will store the array of shorts read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [12/35]

Cdr& deserializeArray ( int16_t *  short_t,
size_t  numElements,
Endianness  endianness 
)

This function deserializes an array of shorts with a different endianness.

Parameters
short_tThe variable that will store the array of shorts read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [13/35]

Cdr& deserializeArray ( int32_t *  long_t,
size_t  numElements 
)

This function deserializes an array of longs.

Parameters
long_tThe variable that will store the array of longs read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [14/35]

Cdr& deserializeArray ( int32_t *  long_t,
size_t  numElements,
Endianness  endianness 
)

This function deserializes an array of longs with a different endianness.

Parameters
long_tThe variable that will store the array of longs read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [15/35]

Cdr& deserializeArray ( int64_t *  longlong_t,
size_t  numElements 
)

This function deserializes an array of long longs.

Parameters
longlong_tThe variable that will store the array of long longs read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [16/35]

Cdr& deserializeArray ( int64_t *  longlong_t,
size_t  numElements,
Endianness  endianness 
)

This function deserializes an array of long longs with a different endianness.

Parameters
longlong_tThe variable that will store the array of long longs read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [17/35]

Cdr& deserializeArray ( int8_t *  int8,
size_t  numElements 
)
inline

This function deserializes an array of int8_t.

Parameters
int8The variable that will store the array of int8_t read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [18/35]

Cdr& deserializeArray ( int8_t *  int8,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of int8_t with a different endianness.

Parameters
int8The variable that will store the array of int8_t read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [19/35]

Cdr& deserializeArray ( long double *  ldouble_t,
size_t  numElements 
)

This function deserializes an array of long doubles.

Parameters
ldouble_tThe variable that will store the array of long doubles read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [20/35]

Cdr& deserializeArray ( long double *  ldouble_t,
size_t  numElements,
Endianness  endianness 
)

This function deserializes an array of long doubles with a different endianness.

Parameters
ldouble_tThe variable that will store the array of long doubles read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [21/35]

Cdr& deserializeArray ( std::string *  string_t,
size_t  numElements 
)
inline

This function deserializes an array of strings.

Parameters
string_tThe variable that will store the array of strings read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [22/35]

Cdr& deserializeArray ( std::string *  string_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of strings with a different endianness.

Parameters
string_tThe variable that will store the array of strings read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [23/35]

Cdr& deserializeArray ( std::vector< _T > *  vector_t,
size_t  numElements 
)
inline

This function deserializes an array of sequences of objects.

Parameters
vector_tThe variable that will store the array of sequences of objects read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [24/35]

Cdr& deserializeArray ( std::wstring *  string_t,
size_t  numElements 
)
inline

This function deserializes an array of wide-strings.

Parameters
string_tThe variable that will store the array of wide-strings read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [25/35]

Cdr& deserializeArray ( std::wstring *  string_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of wide-strings with a different endianness.

Parameters
string_tThe variable that will store the array of wide-strings read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [26/35]

Cdr& deserializeArray ( uint16_t *  ushort_t,
size_t  numElements 
)
inline

This function deserializes an array of unsigned shorts.

Parameters
ushort_tThe variable that will store the array of unsigned shorts read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [27/35]

Cdr& deserializeArray ( uint16_t *  ushort_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of unsigned shorts with a different endianness.

Parameters
ushort_tThe variable that will store the array of unsigned shorts read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [28/35]

Cdr& deserializeArray ( uint32_t *  ulong_t,
size_t  numElements 
)
inline

This function deserializes an array of unsigned longs.

Parameters
ulong_tThe variable that will store the array of unsigned longs read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [29/35]

Cdr& deserializeArray ( uint32_t *  ulong_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of unsigned longs with a different endianness.

Parameters
ulong_tThe variable that will store the array of unsigned longs read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [30/35]

Cdr& deserializeArray ( uint64_t *  ulonglong_t,
size_t  numElements 
)
inline

This function deserializes an array of unsigned long longs.

Parameters
ulonglong_tThe variable that will store the array of unsigned long longs read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [31/35]

Cdr& deserializeArray ( uint64_t *  ulonglong_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of unsigned long longs with a different endianness.

Parameters
ulonglong_tThe variable that will store the array of unsigned long longs read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [32/35]

Cdr& deserializeArray ( uint8_t *  octet_t,
size_t  numElements 
)
inline

This function deserializes an array of octets.

Parameters
octet_tThe variable that will store the array of octets read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [33/35]

Cdr& deserializeArray ( uint8_t *  octet_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function deserializes an array of octets with a different endianness.

Parameters
octet_tThe variable that will store the array of octets read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [34/35]

Cdr& deserializeArray ( wchar_t *  wchar,
size_t  numElements 
)

This function deserializes an array of wide-chars.

Parameters
wcharThe variable that will store the array of wide-chars read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeArray() [35/35]

Cdr& deserializeArray ( wchar_t *  wchar,
size_t  numElements,
Endianness  endianness 
)

This function deserializes an array of wide-chars with a different endianness.

Parameters
wcharThe variable that will store the array of wide-chars read from the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeSequence() [1/2]

Cdr& deserializeSequence ( _T *&  sequence_t,
size_t &  numElements 
)
inline

This function template deserializes a raw sequence.

This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. The user will have to free this allocated memory using free()

Parameters
sequence_tThe pointer that will store the sequence read from the buffer.
numElementsThis variable return the number of elements of the sequence.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ deserializeSequence() [2/2]

Cdr& deserializeSequence ( _T *&  sequence_t,
size_t &  numElements,
Endianness  endianness 
)
inline

This function template deserializes a raw sequence with a different endianness.

This function allocates memory to store the sequence. The user pointer will be set to point this allocated memory. The user will have to free this allocated memory using free()

Parameters
sequence_tThe pointer that will store the sequence read from the buffer.
numElementsThis variable return the number of elements of the sequence.
endiannessEndianness that will be used in the deserialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ endianness()

Endianness endianness ( ) const
inline

This function returns the current endianness used by the CDR type.

Returns
The endianness.

◆ getBufferPointer()

char* getBufferPointer ( )

This function returns the pointer to the current used buffer.

Returns
Pointer to the starting position of the buffer.

◆ getCurrentPosition()

char* getCurrentPosition ( )

This function returns the current position in the CDR stream.

Returns
Pointer to the current position in the buffer.

◆ getDDSCdrOptions()

uint16_t getDDSCdrOptions ( ) const

This function returns the option flags when the CDR type is eprosima::fastcdr::DDS_CDR.

Returns
The option flags.

◆ getDDSCdrPlFlag()

DDSCdrPlFlag getDDSCdrPlFlag ( ) const

This function returns the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR.

Returns
The flag that specifies if the content is a parameter list.

◆ getSerializedDataLength()

size_t getSerializedDataLength ( ) const
inline

This function returns the length of the serialized data inside the stream.

Returns
The length of the serialized data.

◆ getState()

state getState ( )

This function returns the current state of the CDR serialization process.

Returns
The current state of the CDR serialization process.

◆ jump()

bool jump ( size_t  numBytes)

This function skips a number of bytes in the CDR stream buffer.

Parameters
numBytesThe number of bytes that will be jumped.
Returns
True is returned when it works successfully. Otherwise, false is returned.

◆ moveAlignmentForward()

bool moveAlignmentForward ( size_t  numBytes)

This function moves the alignment forward.

Parameters
numBytesThe number of bytes the alignment should advance.
Returns
True If alignment was moved successfully.

◆ operator<<() [1/21]

Cdr& operator<< ( char *  string_t)
inline

This operator serializes a null-terminated c-string.

Parameters
string_tPointer to the begining of the string that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [2/21]

Cdr& operator<< ( const _T &  type_t)
inline

This operator template is used to serialize any other non-basic type.

Parameters
type_tA reference to the object that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [3/21]

Cdr& operator<< ( const bool  bool_t)
inline

This operator serializes a boolean.

Parameters
bool_tThe value of the boolean that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [4/21]

Cdr& operator<< ( const char *  string_t)
inline

This operator serializes a null-terminated c-string.

Parameters
string_tPointer to the begining of the string that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [5/21]

Cdr& operator<< ( const char  char_t)
inline

This operator serializes a character.

Parameters
char_tThe value of the character that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [6/21]

Cdr& operator<< ( const double  double_t)
inline

This operator serializes a double.

Parameters
double_tThe value of the double that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [7/21]

Cdr& operator<< ( const float  float_t)
inline

This operator serializes a float.

Parameters
float_tThe value of the float that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [8/21]

Cdr& operator<< ( const int16_t  short_t)
inline

This operator serializes a short.

Parameters
short_tThe value of the short that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [9/21]

Cdr& operator<< ( const int32_t  long_t)
inline

This operator serializes a long.

Parameters
long_tThe value of the long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [10/21]

Cdr& operator<< ( const int64_t  longlong_t)
inline

This operator serializes a long long.

Parameters
longlong_tThe value of the long long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [11/21]

Cdr& operator<< ( const int8_t  int8)
inline

This operator serializes a int8_t.

Parameters
int8The value of the int8_t that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [12/21]

Cdr& operator<< ( const long double  ldouble_t)
inline

This operator serializes a long double.

Parameters
ldouble_tThe value of the long double that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [13/21]

Cdr& operator<< ( const std::map< _K, _T > &  map_t)
inline

This operator template is used to serialize maps.

Parameters
map_tThe map that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [14/21]

Cdr& operator<< ( const std::string &  string_t)
inline

This operator serializes a string.

Parameters
string_tThe string that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [15/21]

Cdr& operator<< ( const std::vector< _T > &  vector_t)
inline

This operator template is used to serialize sequences.

Parameters
vector_tThe sequence that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [16/21]

Cdr& operator<< ( const std::wstring &  string_t)
inline

This operator serializes a wstring.

Parameters
string_tThe wstring that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [17/21]

Cdr& operator<< ( const uint16_t  ushort_t)
inline

This operator serializes an unsigned short.

Parameters
ushort_tThe value of the unsigned short that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [18/21]

Cdr& operator<< ( const uint32_t  ulong_t)
inline

This operator serializes an unsigned long.

Parameters
ulong_tThe value of the unsigned long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [19/21]

Cdr& operator<< ( const uint64_t  ulonglong_t)
inline

This operator serializes an unsigned long long.

Parameters
ulonglong_tThe value of the unsigned long long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [20/21]

Cdr& operator<< ( const uint8_t  octet_t)
inline

This operator serializes an octet.

Parameters
octet_tThe value of the octet that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator<<() [21/21]

Cdr& operator<< ( const wchar_t  wchar)
inline

This operator serializes a wide-char.

Parameters
wcharThe value of the wide-char that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator>>() [1/20]

Cdr& operator>> ( _T &  type_t)
inline

This operator template is used to deserialize any other non-basic type.

Parameters
type_tThe variable that will store the object read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ operator>>() [2/20]

Cdr& operator>> ( bool &  bool_t)
inline

This operator deserializes a boolean.

Parameters
bool_tThe variable that will store the boolean read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize an invalid value.

◆ operator>>() [3/20]

Cdr& operator>> ( char &  char_t)
inline

This operator deserializes a character.

Parameters
char_tThe variable that will store the character read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [4/20]

Cdr& operator>> ( char *&  string_t)
inline

This operator deserializes a null-terminated c-string.

Parameters
string_tThe variable that will store the c-string read from the buffer. Please note that a newly allocated string will be returned. The caller should free the returned pointer when appropiate.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize an invalid value.

◆ operator>>() [5/20]

Cdr& operator>> ( double &  double_t)
inline

This operator deserializes a double.

Parameters
double_tThe variable that will store the double read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [6/20]

Cdr& operator>> ( float &  float_t)
inline

This operator deserializes a float.

Parameters
float_tThe variable that will store the float read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [7/20]

Cdr& operator>> ( int16_t &  short_t)
inline

This operator deserializes a short.

Parameters
short_tThe variable that will store the short read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [8/20]

Cdr& operator>> ( int32_t &  long_t)
inline

This operator deserializes a long.

Parameters
long_tThe variable that will store the long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [9/20]

Cdr& operator>> ( int64_t &  longlong_t)
inline

This operator deserializes a long long.

Parameters
longlong_tThe variable that will store the long long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [10/20]

Cdr& operator>> ( int8_t &  int8)
inline

This operator deserializes a int8_t.

Parameters
int8The variable that will store the int8_t read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [11/20]

Cdr& operator>> ( long double &  ldouble_t)
inline

This operator deserializes a long double.

Parameters
ldouble_tThe variable that will store the long double read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [12/20]

Cdr& operator>> ( std::map< _K, _T > &  map_t)
inline

This operator template is used to deserialize maps.

Parameters
map_tThe variable that will store the map read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [13/20]

Cdr& operator>> ( std::string &  string_t)
inline

This operator deserializes a string.

Parameters
string_tThe variable that will store the string read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [14/20]

Cdr& operator>> ( std::vector< _T > &  vector_t)
inline

This operator template is used to deserialize sequences.

Parameters
vector_tThe variable that will store the sequence read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [15/20]

Cdr& operator>> ( std::wstring &  string_t)
inline

This operator deserializes a string.

Parameters
string_tThe variable that will store the string read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [16/20]

Cdr& operator>> ( uint16_t &  ushort_t)
inline

This operator deserializes an unsigned short.

Parameters
ushort_tThe variable that will store the unsigned short read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [17/20]

Cdr& operator>> ( uint32_t &  ulong_t)
inline

This operator deserializes an unsigned long.

Parameters
ulong_tThe variable that will store the unsigned long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [18/20]

Cdr& operator>> ( uint64_t &  ulonglong_t)
inline

This operator deserializes a unsigned long long.

Parameters
ulonglong_tThe variable that will store the unsigned long long read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [19/20]

Cdr& operator>> ( uint8_t &  octet_t)
inline

This operator deserializes an octet.

Parameters
octet_tThe variable that will store the octet read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ operator>>() [20/20]

Cdr& operator>> ( wchar_t &  wchar)
inline

This operator deserializes a wide-char.

Parameters
wcharThe variable that will store the wide-char read from the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.

◆ read_encapsulation()

Cdr& read_encapsulation ( )

This function reads the encapsulation of the CDR stream.

If the CDR stream contains an encapsulation, then this function should be called before starting to deserialize.

Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize an invalid value.

◆ reset()

void reset ( )

This function resets the current position in the buffer to the beginning.

◆ resetAlignment()

void resetAlignment ( )
inline

This function resets the alignment to the current position in the buffer.

◆ serialize() [1/40]

Cdr& serialize ( char *  string_t)
inline

This function serializes a string.

Parameters
string_tThe pointer to the string that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [2/40]

Cdr& serialize ( const _T &  type_t)
inline

This function template serializes a non-basic object.

Parameters
type_tThe object that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [3/40]

Cdr& serialize ( const bool  bool_t)

This function serializes a boolean.

Parameters
bool_tThe value of the boolean that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [4/40]

Cdr& serialize ( const bool  bool_t,
Endianness  endianness 
)
inline

This function serializes a boolean with a different endianness.

Parameters
bool_tThe value of the boolean that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [5/40]

Cdr& serialize ( const char *  string_t)

This function serializes a string.

Parameters
string_tThe pointer to the string that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [6/40]

Cdr& serialize ( const char *  string_t,
Endianness  endianness 
)

This function serializes a string with a different endianness.

Parameters
string_tThe pointer to the string that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [7/40]

Cdr& serialize ( const char  char_t)

This function serializes a character.

Parameters
char_tThe value of the character that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [8/40]

Cdr& serialize ( const char  char_t,
Endianness  endianness 
)
inline

This function serializes a character with a different endianness.

Parameters
char_tThe value of the character that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [9/40]

Cdr& serialize ( const double  double_t)

This function serializes a double.

Parameters
double_tThe value of the double that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [10/40]

Cdr& serialize ( const double  double_t,
Endianness  endianness 
)

This function serializes a double with a different endianness.

Parameters
double_tThe value of the double that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [11/40]

Cdr& serialize ( const float  float_t)

This function serializes a float.

Parameters
float_tThe value of the float that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [12/40]

Cdr& serialize ( const float  float_t,
Endianness  endianness 
)

This function serializes a float with a different endianness.

Parameters
float_tThe value of the float that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [13/40]

Cdr& serialize ( const int16_t  short_t)

This function serializes a short.

Parameters
short_tThe value of the short that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [14/40]

Cdr& serialize ( const int16_t  short_t,
Endianness  endianness 
)

This function serializes a short with a different endianness.

Parameters
short_tThe value of the short that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [15/40]

Cdr& serialize ( const int32_t  long_t)

This function serializes a long.

Parameters
long_tThe value of the long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [16/40]

Cdr& serialize ( const int32_t  long_t,
Endianness  endianness 
)

This function serializes a long with a different endianness.

Parameters
long_tThe value of the long that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [17/40]

Cdr& serialize ( const int64_t  longlong_t)

This function serializes a long long.

Parameters
longlong_tThe value of the long long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [18/40]

Cdr& serialize ( const int64_t  longlong_t,
Endianness  endianness 
)

This function serializes a long long with a different endianness.

Parameters
longlong_tThe value of the long long that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [19/40]

Cdr& serialize ( const int8_t  int8)
inline

This function serializes an int8_t.

Parameters
int8The value of the int8_t that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [20/40]

Cdr& serialize ( const int8_t  int8,
Endianness  endianness 
)
inline

This function serializes an int8_t with a different endianness.

Parameters
int8The value of the int8_t that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [21/40]

Cdr& serialize ( const long double  ldouble_t)

This function serializes a long double.

Parameters
ldouble_tThe value of the long double that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.
Note
Due to internal representation differences, WIN32 and *NIX like systems are not compatible.

◆ serialize() [22/40]

Cdr& serialize ( const long double  ldouble_t,
Endianness  endianness 
)

This function serializes a long double with a different endianness.

Parameters
ldouble_tThe value of the long double that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.
Note
Due to internal representation differences, WIN32 and *NIX like systems are not compatible.

◆ serialize() [23/40]

Cdr& serialize ( const std::map< _K, _T > &  map_t)
inline

This function template serializes a map.

Parameters
map_tThe map that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [24/40]

Cdr& serialize ( const std::string &  string_t)
inline

This function serializes a std::string.

Parameters
string_tThe string that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [25/40]

Cdr& serialize ( const std::string &  string_t,
Endianness  endianness 
)
inline

This function serializes a std::string with a different endianness.

Parameters
string_tThe string that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [26/40]

Cdr& serialize ( const std::vector< _T > &  vector_t)
inline

This function template serializes a sequence.

Parameters
vector_tThe sequence that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [27/40]

Cdr& serialize ( const std::vector< _T > &  vector_t,
Endianness  endianness 
)
inline

This function template serializes a sequence with a different endianness.

Parameters
vector_tThe sequence that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [28/40]

Cdr& serialize ( const std::wstring &  string_t)
inline

This function serializes a std::wstring.

Parameters
string_tThe wstring that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [29/40]

Cdr& serialize ( const uint16_t  ushort_t)
inline

This function serializes an unsigned short.

Parameters
ushort_tThe value of the unsigned short that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [30/40]

Cdr& serialize ( const uint16_t  ushort_t,
Endianness  endianness 
)
inline

This function serializes an unsigned short with a different endianness.

Parameters
ushort_tThe value of the unsigned short that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [31/40]

Cdr& serialize ( const uint32_t  ulong_t)
inline

This function serializes an unsigned long.

Parameters
ulong_tThe value of the unsigned long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [32/40]

Cdr& serialize ( const uint32_t  ulong_t,
Endianness  endianness 
)
inline

This function serializes an unsigned long with a different endianness.

Parameters
ulong_tThe value of the unsigned long that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [33/40]

Cdr& serialize ( const uint64_t  ulonglong_t)
inline

This function serializes an unsigned long long.

Parameters
ulonglong_tThe value of the unsigned long long that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [34/40]

Cdr& serialize ( const uint64_t  ulonglong_t,
Endianness  endianness 
)
inline

This function serializes an unsigned long long with a different endianness.

Parameters
ulonglong_tThe value of the unsigned long long that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [35/40]

Cdr& serialize ( const uint8_t  octet_t)
inline

This function serializes an octet.

Parameters
octet_tThe value of the octet that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [36/40]

Cdr& serialize ( const uint8_t  octet_t,
Endianness  endianness 
)
inline

This function serializes an octet with a different endianness.

Parameters
octet_tThe value of the octet that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [37/40]

Cdr& serialize ( const wchar_t *  string_t)

This function serializes a wstring.

Parameters
string_tThe pointer to the wstring that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [38/40]

Cdr& serialize ( const wchar_t *  string_t,
Endianness  endianness 
)

This function serializes a wstring with a different endianness.

Parameters
string_tThe pointer to the wstring that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [39/40]

Cdr& serialize ( const wchar_t  wchar)
inline

This function serializes a wide-char.

Parameters
wcharThe value of the wide-char that will be serialized in the buffer.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize() [40/40]

Cdr& serialize ( const wchar_t  wchar,
Endianness  endianness 
)
inline

This function serializes a wide-char with a different endianness.

Parameters
wcharThe value of the wide-char that will be serialized in the buffer.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serialize_encapsulation()

Cdr& serialize_encapsulation ( )

This function writes the encapsulation of the CDR stream.

If the CDR stream should contain an encapsulation, then this function should be called before starting to serialize.

Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [1/35]

Cdr& serializeArray ( const _T *  type_t,
size_t  numElements 
)
inline

This function template serializes an array of non-basic objects.

Parameters
type_tThe array of objects that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [2/35]

Cdr& serializeArray ( const _T *  type_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function template serializes an array of non-basic objects with a different endianness.

Parameters
type_tThe array of objects that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [3/35]

Cdr& serializeArray ( const bool *  bool_t,
size_t  numElements 
)

This function serializes an array of booleans.

Parameters
bool_tThe array of booleans that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [4/35]

Cdr& serializeArray ( const bool *  bool_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of booleans with a different endianness.

Parameters
bool_tThe array of booleans that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [5/35]

Cdr& serializeArray ( const char *  char_t,
size_t  numElements 
)

This function serializes an array of characters.

Parameters
char_tThe array of characters that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [6/35]

Cdr& serializeArray ( const char *  char_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of characters with a different endianness.

Parameters
char_tThe array of characters that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [7/35]

Cdr& serializeArray ( const double *  double_t,
size_t  numElements 
)

This function serializes an array of doubles.

Parameters
double_tThe array of doubles that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [8/35]

Cdr& serializeArray ( const double *  double_t,
size_t  numElements,
Endianness  endianness 
)

This function serializes an array of doubles with a different endianness.

Parameters
double_tThe array of doubles that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [9/35]

Cdr& serializeArray ( const float *  float_t,
size_t  numElements 
)

This function serializes an array of floats.

Parameters
float_tThe array of floats that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [10/35]

Cdr& serializeArray ( const float *  float_t,
size_t  numElements,
Endianness  endianness 
)

This function serializes an array of floats with a different endianness.

Parameters
float_tThe array of floats that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [11/35]

Cdr& serializeArray ( const int16_t *  short_t,
size_t  numElements 
)

This function serializes an array of shorts.

Parameters
short_tThe array of shorts that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [12/35]

Cdr& serializeArray ( const int16_t *  short_t,
size_t  numElements,
Endianness  endianness 
)

This function serializes an array of shorts with a different endianness.

Parameters
short_tThe array of shorts that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [13/35]

Cdr& serializeArray ( const int32_t *  long_t,
size_t  numElements 
)

This function serializes an array of longs.

Parameters
long_tThe array of longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [14/35]

Cdr& serializeArray ( const int32_t *  long_t,
size_t  numElements,
Endianness  endianness 
)

This function serializes an array of longs with a different endianness.

Parameters
long_tThe array of longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [15/35]

Cdr& serializeArray ( const int64_t *  longlong_t,
size_t  numElements 
)

This function serializes an array of long longs.

Parameters
longlong_tThe array of long longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [16/35]

Cdr& serializeArray ( const int64_t *  longlong_t,
size_t  numElements,
Endianness  endianness 
)

This function serializes an array of long longs with a different endianness.

Parameters
longlong_tThe array of long longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [17/35]

Cdr& serializeArray ( const int8_t *  int8,
size_t  numElements 
)
inline

This function serializes an array of int8_t.

Parameters
int8The sequence of int8_t that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [18/35]

Cdr& serializeArray ( const int8_t *  int8,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of int8_t with a different endianness.

Parameters
int8The array of int8_t that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [19/35]

Cdr& serializeArray ( const long double *  ldouble_t,
size_t  numElements 
)

This function serializes an array of long doubles.

Parameters
ldouble_tThe array of long doubles that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [20/35]

Cdr& serializeArray ( const long double *  ldouble_t,
size_t  numElements,
Endianness  endianness 
)

This function serializes an array of long doubles with a different endianness.

Parameters
ldouble_tThe array of long doubles that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [21/35]

Cdr& serializeArray ( const std::string *  string_t,
size_t  numElements 
)
inline

This function serializes an array of strings.

Parameters
string_tThe array of strings that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [22/35]

Cdr& serializeArray ( const std::string *  string_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of strings with a different endianness.

Parameters
string_tThe array of strings that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [23/35]

Cdr& serializeArray ( const std::vector< _T > *  vector_t,
size_t  numElements 
)
inline

This function template serializes an array of sequences of objects.

Parameters
vector_tThe array of sequences of objects that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [24/35]

Cdr& serializeArray ( const std::wstring *  string_t,
size_t  numElements 
)
inline

This function serializes an array of wide-strings.

Parameters
string_tThe array of wide-strings that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [25/35]

Cdr& serializeArray ( const std::wstring *  string_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of wide-strings with a different endianness.

Parameters
string_tThe array of wide-strings that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [26/35]

Cdr& serializeArray ( const uint16_t *  ushort_t,
size_t  numElements 
)
inline

This function serializes an array of unsigned shorts.

Parameters
ushort_tThe array of unsigned shorts that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [27/35]

Cdr& serializeArray ( const uint16_t *  ushort_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of unsigned shorts with a different endianness.

Parameters
ushort_tThe array of unsigned shorts that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [28/35]

Cdr& serializeArray ( const uint32_t *  ulong_t,
size_t  numElements 
)
inline

This function serializes an array of unsigned longs.

Parameters
ulong_tThe array of unsigned longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [29/35]

Cdr& serializeArray ( const uint32_t *  ulong_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of unsigned longs with a different endianness.

Parameters
ulong_tThe array of unsigned longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [30/35]

Cdr& serializeArray ( const uint64_t *  ulonglong_t,
size_t  numElements 
)
inline

This function serializes an array of unsigned long longs.

Parameters
ulonglong_tThe array of unsigned long longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [31/35]

Cdr& serializeArray ( const uint64_t *  ulonglong_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of unsigned long longs with a different endianness.

Parameters
ulonglong_tThe array of unsigned long longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [32/35]

Cdr& serializeArray ( const uint8_t *  octet_t,
size_t  numElements 
)
inline

This function serializes an array of octets.

Parameters
octet_tThe sequence of octets that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [33/35]

Cdr& serializeArray ( const uint8_t *  octet_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function serializes an array of octets with a different endianness.

Parameters
octet_tThe array of octets that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [34/35]

Cdr& serializeArray ( const wchar_t *  wchar,
size_t  numElements 
)

This function serializes an array of wide-chars.

Parameters
wcharThe array of wide-chars that will be serialized in the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeArray() [35/35]

Cdr& serializeArray ( const wchar_t *  wchar,
size_t  numElements,
Endianness  endianness 
)

This function serializes an array of wide-chars with a different endianness.

Parameters
wcharThe array of longs that will be serialized in the buffer.
numElementsNumber of the elements in the array.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeSequence() [1/2]

Cdr& serializeSequence ( const _T *  sequence_t,
size_t  numElements 
)
inline

This function template serializes a raw sequence.

Parameters
sequence_tPointer to the sequence that will be serialized in the buffer.
numElementsThe number of elements contained in the sequence.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ serializeSequence() [2/2]

Cdr& serializeSequence ( const _T *  sequence_t,
size_t  numElements,
Endianness  endianness 
)
inline

This function template serializes a raw sequence with a different endianness.

Parameters
sequence_tPointer to the sequence that will be serialized in the buffer.
numElementsThe number of elements contained in the sequence.
endiannessEndianness that will be used in the serialization of this value.
Returns
Reference to the eprosima::fastcdr::Cdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize a position that exceeds the internal memory size.

◆ setDDSCdrOptions()

void setDDSCdrOptions ( uint16_t  options)

This function sets the option flags when the CDR type is eprosima::fastcdr::DDS_CDR.

Parameters
optionsNew value for the option flags.

◆ setDDSCdrPlFlag()

void setDDSCdrPlFlag ( DDSCdrPlFlag  plFlag)

This function sets the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR.

Parameters
plFlagNew value for the flag that specifies if the content is a parameter list.

◆ setState()

void setState ( state state)

This function sets a previous state of the CDR serialization process;.

Parameters
statePrevious state that will be set.

Member Data Documentation

◆ DEFAULT_ENDIAN

const Endianness DEFAULT_ENDIAN
static

Default endiness in the system.


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