Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
eprosima::fastcdr::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...
 
void changeEndianness (Endianness endianness)
 This function sets the current endianness used by the CDR type. 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. 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() More...
 
Cdrdeserialize (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() More...
 
Cdrdeserialize (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() More...
 
Cdrdeserialize (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() 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. 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() More...
 
template<class _T >
CdrdeserializeSequence (_T *&sequence_t, size_t &numElements, Endianness endianness)
 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() More...
 
Endianness endianness () const
 This function returns the current endianness used by the CDR type. 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...
 
uint16_t getDDSCdrOptions () const
 This function returns the option flags when the CDR type is eprosima::fastcdr::DDS_CDR. More...
 
DDSCdrPlFlag getDDSCdrPlFlag () const
 This function returns the parameter list flag when the CDR type is eprosima::fastcdr::DDS_CDR. 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...
 
bool jump (size_t numBytes)
 This function skips a number of bytes in the CDR stream buffer. More...
 
bool moveAlignmentForward (size_t numBytes)
 This function moves the alignment forward. 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...
 
Cdrread_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. More...
 
void reset ()
 This function resets the current position in the buffer to the beginning. More...
 
void resetAlignment ()
 This function resets the alignment to the current position in the buffer. 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...
 
Cdrserialize_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. 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...
 
void setDDSCdrOptions (uint16_t options)
 This function sets the option flags 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...
 
void setState (state &state)
 This function sets a previous state of the CDR serialization process;. 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 = LITTLE_ENDIANNESS
 Default endiness in the system. More...
 

Private Member Functions

size_t alignment (size_t dataSize) const
 This function returns the extra bytes regarding the allignment. More...
 
 Cdr (const Cdr &)=delete
 
CdrdeserializeBoolSequence (std::vector< bool > &vector_t)
 
CdrdeserializeStringSequence (std::string *&sequence_t, size_t &numElements)
 
CdrdeserializeWStringSequence (std::wstring *&sequence_t, size_t &numElements)
 
void makeAlign (size_t align)
 This function jumps the number of bytes of the alignment. These bytes should be calculated with the function eprosima::fastcdr::Cdr::alignment. More...
 
Cdroperator= (const Cdr &)=delete
 
const char * readString (uint32_t &length)
 
const std::wstring readWString (uint32_t &length)
 
bool resize (size_t minSizeInc)
 This function resizes the internal buffer. It only applies if the FastBuffer object was created with the default constructor. More...
 
CdrserializeBoolSequence (const std::vector< bool > &vector_t)
 

Private Attributes

FastBuffer::iterator m_alignPosition
 The position from where the aligment is calculated. More...
 
FastBufferm_cdrBuffer
 Reference to the buffer that will be serialized/deserialized. More...
 
CdrType m_cdrType
 The type of CDR that will be use in serialization/deserialization. More...
 
FastBuffer::iterator m_currentPosition
 The current position in the serialization/deserialization process. More...
 
uint8_t m_endianness
 The endianness that will be applied over the buffer. More...
 
size_t m_lastDataSize
 Stores the last datasize serialized/deserialized. It's used to optimize. More...
 
FastBuffer::iterator m_lastPosition
 The last position in the buffer;. More...
 
uint16_t m_options
 This attribute stores the option flags when the CDR type is DDS_CDR;. More...
 
DDSCdrPlFlag m_plFlag
 Using DDS_CDR type, this attribute stores if the stream buffer contains a parameter list or not. More...
 
bool m_swapBytes
 This attribute specifies if it is needed to swap the bytes. More...
 

Detailed Description

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

Definition at line 43 of file Cdr.h.

Member Enumeration Documentation

◆ 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.

Definition at line 48 of file Cdr.h.

◆ 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.

Definition at line 61 of file Cdr.h.

◆ Endianness

This enumeration represents endianness types.

Enumerator
BIG_ENDIANNESS 

Big endianness.

LITTLE_ENDIANNESS 

Little endianness.

Definition at line 76 of file Cdr.h.

Constructor & Destructor Documentation

◆ Cdr() [1/2]

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.

Definition at line 47 of file Cdr.cpp.

◆ Cdr() [2/2]

eprosima::fastcdr::Cdr::Cdr ( const Cdr )
privatedelete

Member Function Documentation

◆ alignment() [1/2]

static size_t eprosima::fastcdr::Cdr::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.

Definition at line 239 of file Cdr.h.

◆ alignment() [2/2]

size_t eprosima::fastcdr::Cdr::alignment ( size_t  dataSize) const
inlineprivate

This function returns the extra bytes regarding the allignment.

Parameters
dataSizeThe size of the data that will be serialized.
Returns
The size needed for the aligment.

Definition at line 3492 of file Cdr.h.

◆ changeEndianness()

void Cdr::changeEndianness ( Endianness  endianness)

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

Parameters
endiannessThe new endianness value.

Definition at line 189 of file Cdr.cpp.

◆ deserialize() [1/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2035 of file Cdr.h.

◆ deserialize() [2/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2049 of file Cdr.h.

◆ deserialize() [3/40]

Cdr & 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.

Definition at line 1419 of file Cdr.cpp.

◆ deserialize() [4/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2073 of file Cdr.h.

◆ deserialize() [5/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2088 of file Cdr.h.

◆ deserialize() [6/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2102 of file Cdr.h.

◆ deserialize() [7/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2116 of file Cdr.h.

◆ deserialize() [8/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2130 of file Cdr.h.

◆ deserialize() [9/40]

Cdr & 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.

Definition at line 1434 of file Cdr.cpp.

◆ deserialize() [10/40]

Cdr & 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.

Definition at line 1467 of file Cdr.cpp.

◆ deserialize() [11/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2164 of file Cdr.h.

◆ deserialize() [12/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2178 of file Cdr.h.

◆ deserialize() [13/40]

Cdr & 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.

Definition at line 1488 of file Cdr.cpp.

◆ deserialize() [14/40]

Cdr & 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.

Definition at line 1523 of file Cdr.cpp.

◆ deserialize() [15/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2212 of file Cdr.h.

◆ deserialize() [16/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2229 of file Cdr.h.

◆ deserialize() [17/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2246 of file Cdr.h.

◆ deserialize() [18/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2260 of file Cdr.h.

◆ deserialize() [19/40]

Cdr & 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.

Definition at line 1544 of file Cdr.cpp.

◆ deserialize() [20/40]

Cdr & 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.

Definition at line 1583 of file Cdr.cpp.

◆ deserialize() [21/40]

Cdr & 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.

Definition at line 1604 of file Cdr.cpp.

◆ deserialize() [22/40]

Cdr & 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.

Definition at line 1639 of file Cdr.cpp.

◆ deserialize() [23/40]

Cdr & 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.

Definition at line 1660 of file Cdr.cpp.

◆ deserialize() [24/40]

Cdr & 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.

Definition at line 1699 of file Cdr.cpp.

◆ deserialize() [25/40]

Cdr & 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.

Definition at line 1720 of file Cdr.cpp.

◆ deserialize() [26/40]

Cdr & 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.

Definition at line 1802 of file Cdr.cpp.

◆ deserialize() [27/40]

Cdr & 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.

Definition at line 1823 of file Cdr.cpp.

◆ deserialize() [28/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2368 of file Cdr.h.

◆ deserialize() [29/40]

Cdr & 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.

Definition at line 1852 of file Cdr.cpp.

◆ deserialize() [30/40]

Cdr & 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.

Definition at line 1883 of file Cdr.cpp.

◆ deserialize() [31/40]

Cdr & 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.

Definition at line 1922 of file Cdr.cpp.

◆ deserialize() [32/40]

Cdr & 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.

Definition at line 1943 of file Cdr.cpp.

◆ deserialize() [33/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2435 of file Cdr.h.

◆ deserialize() [34/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2451 of file Cdr.h.

◆ deserialize() [35/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2467 of file Cdr.h.

◆ deserialize() [36/40]

Cdr& eprosima::fastcdr::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.

Definition at line 2496 of file Cdr.h.

◆ deserialize() [37/40]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 2571 of file Cdr.h.

◆ deserialize() [38/40]

template<class _K , class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 2613 of file Cdr.h.

◆ deserialize() [39/40]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 2665 of file Cdr.h.

◆ deserialize() [40/40]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 2693 of file Cdr.h.

◆ deserializeArray() [1/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2708 of file Cdr.h.

◆ deserializeArray() [2/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2724 of file Cdr.h.

◆ deserializeArray() [3/35]

Cdr & 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.

Definition at line 2060 of file Cdr.cpp.

◆ deserializeArray() [4/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2752 of file Cdr.h.

◆ deserializeArray() [5/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2769 of file Cdr.h.

◆ deserializeArray() [6/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2785 of file Cdr.h.

◆ deserializeArray() [7/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2801 of file Cdr.h.

◆ deserializeArray() [8/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2817 of file Cdr.h.

◆ deserializeArray() [9/35]

Cdr & 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.

Definition at line 2079 of file Cdr.cpp.

◆ deserializeArray() [10/35]

Cdr & 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.

Definition at line 2126 of file Cdr.cpp.

◆ deserializeArray() [11/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2857 of file Cdr.h.

◆ deserializeArray() [12/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2873 of file Cdr.h.

◆ deserializeArray() [13/35]

Cdr & 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.

Definition at line 2148 of file Cdr.cpp.

◆ deserializeArray() [14/35]

Cdr & 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.

Definition at line 2197 of file Cdr.cpp.

◆ deserializeArray() [15/35]

Cdr & 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.

Definition at line 2219 of file Cdr.cpp.

◆ deserializeArray() [16/35]

Cdr & 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.

Definition at line 2237 of file Cdr.cpp.

◆ deserializeArray() [17/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2937 of file Cdr.h.

◆ deserializeArray() [18/35]

Cdr& eprosima::fastcdr::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.

Definition at line 2953 of file Cdr.h.

◆ deserializeArray() [19/35]

Cdr & 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.

Definition at line 2259 of file Cdr.cpp.

◆ deserializeArray() [20/35]

Cdr & 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.

Definition at line 2312 of file Cdr.cpp.

◆ deserializeArray() [21/35]

Cdr & 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.

Definition at line 2334 of file Cdr.cpp.

◆ deserializeArray() [22/35]

Cdr & 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.

Definition at line 2383 of file Cdr.cpp.

◆ deserializeArray() [23/35]

Cdr & 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.

Definition at line 2405 of file Cdr.cpp.

◆ deserializeArray() [24/35]

Cdr & 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.

Definition at line 2458 of file Cdr.cpp.

◆ deserializeArray() [25/35]

Cdr & 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.

Definition at line 2480 of file Cdr.cpp.

◆ deserializeArray() [26/35]

Cdr & 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.

Definition at line 2595 of file Cdr.cpp.

◆ deserializeArray() [27/35]

Cdr & 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.

Definition at line 2028 of file Cdr.cpp.

◆ deserializeArray() [28/35]

Cdr& eprosima::fastcdr::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.

Definition at line 3077 of file Cdr.h.

◆ deserializeArray() [29/35]

Cdr& eprosima::fastcdr::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.

Definition at line 3094 of file Cdr.h.

◆ deserializeArray() [30/35]

Cdr& eprosima::fastcdr::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.

Definition at line 3113 of file Cdr.h.

◆ deserializeArray() [31/35]

Cdr& eprosima::fastcdr::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.

Definition at line 3133 of file Cdr.h.

◆ deserializeArray() [32/35]

Cdr& eprosima::fastcdr::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.

Definition at line 3164 of file Cdr.h.

◆ deserializeArray() [33/35]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 3194 of file Cdr.h.

◆ deserializeArray() [34/35]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 3213 of file Cdr.h.

◆ deserializeArray() [35/35]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 3233 of file Cdr.h.

◆ deserializeBoolSequence()

Cdr & Cdr::deserializeBoolSequence ( std::vector< bool > &  vector_t)
private

Definition at line 2652 of file Cdr.cpp.

◆ deserializeSequence() [1/2]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 3302 of file Cdr.h.

◆ deserializeSequence() [2/2]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 3376 of file Cdr.h.

◆ deserializeStringSequence()

Cdr & Cdr::deserializeStringSequence ( std::string *&  sequence_t,
size_t &  numElements 
)
private

Definition at line 2696 of file Cdr.cpp.

◆ deserializeWStringSequence()

Cdr & Cdr::deserializeWStringSequence ( std::wstring *&  sequence_t,
size_t &  numElements 
)
private

Definition at line 2722 of file Cdr.cpp.

◆ endianness()

Endianness eprosima::fastcdr::Cdr::endianness ( ) const
inline

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

Returns
The endianness.

Definition at line 194 of file Cdr.h.

◆ getBufferPointer()

char * Cdr::getBufferPointer ( )

This function returns the pointer to the current used buffer.

Returns
Pointer to the starting position of the buffer.

Definition at line 213 of file Cdr.cpp.

◆ getCurrentPosition()

char * Cdr::getCurrentPosition ( )

This function returns the current position in the CDR stream.

Returns
Pointer to the current position in the buffer.

Definition at line 218 of file Cdr.cpp.

◆ getDDSCdrOptions()

uint16_t Cdr::getDDSCdrOptions ( ) const

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

Returns
The option flags.

Definition at line 178 of file Cdr.cpp.

◆ getDDSCdrPlFlag()

Cdr::DDSCdrPlFlag Cdr::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.

Definition at line 167 of file Cdr.cpp.

◆ getSerializedDataLength()

size_t eprosima::fastcdr::Cdr::getSerializedDataLength ( ) const
inline

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

Returns
The length of the serialized data.

Definition at line 228 of file Cdr.h.

◆ getState()

Cdr::state Cdr::getState ( )

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

Returns
The current state of the CDR serialization process.

Definition at line 223 of file Cdr.cpp.

◆ jump()

bool Cdr::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.

Definition at line 199 of file Cdr.cpp.

◆ makeAlign()

void eprosima::fastcdr::Cdr::makeAlign ( size_t  align)
inlineprivate

This function jumps the number of bytes of the alignment. These bytes should be calculated with the function eprosima::fastcdr::Cdr::alignment.

Parameters
alignThe number of bytes to be skipped.

Definition at line 3504 of file Cdr.h.

◆ moveAlignmentForward()

bool Cdr::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.

Definition at line 245 of file Cdr.cpp.

◆ operator<<() [1/21]

Cdr& eprosima::fastcdr::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.

Definition at line 281 of file Cdr.h.

◆ operator<<() [2/21]

Cdr& eprosima::fastcdr::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.

Definition at line 293 of file Cdr.h.

◆ operator<<() [3/21]

Cdr& eprosima::fastcdr::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.

Definition at line 305 of file Cdr.h.

◆ operator<<() [4/21]

Cdr& eprosima::fastcdr::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.

Definition at line 317 of file Cdr.h.

◆ operator<<() [5/21]

Cdr& eprosima::fastcdr::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.

Definition at line 329 of file Cdr.h.

◆ operator<<() [6/21]

Cdr& eprosima::fastcdr::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.

Definition at line 341 of file Cdr.h.

◆ operator<<() [7/21]

Cdr& eprosima::fastcdr::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.

Definition at line 353 of file Cdr.h.

◆ operator<<() [8/21]

Cdr& eprosima::fastcdr::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.

Definition at line 365 of file Cdr.h.

◆ operator<<() [9/21]

Cdr& eprosima::fastcdr::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.

Definition at line 377 of file Cdr.h.

◆ operator<<() [10/21]

Cdr& eprosima::fastcdr::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.

Definition at line 389 of file Cdr.h.

◆ operator<<() [11/21]

Cdr& eprosima::fastcdr::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.

Definition at line 401 of file Cdr.h.

◆ operator<<() [12/21]

Cdr& eprosima::fastcdr::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.

Definition at line 413 of file Cdr.h.

◆ operator<<() [13/21]

Cdr& eprosima::fastcdr::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.

Definition at line 425 of file Cdr.h.

◆ operator<<() [14/21]

Cdr& eprosima::fastcdr::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.

Definition at line 437 of file Cdr.h.

◆ operator<<() [15/21]

Cdr& eprosima::fastcdr::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.

Definition at line 449 of file Cdr.h.

◆ operator<<() [16/21]

Cdr& eprosima::fastcdr::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.

Definition at line 461 of file Cdr.h.

◆ operator<<() [17/21]

Cdr& eprosima::fastcdr::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.

Definition at line 473 of file Cdr.h.

◆ operator<<() [18/21]

Cdr& eprosima::fastcdr::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.

Definition at line 485 of file Cdr.h.

◆ operator<<() [19/21]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 514 of file Cdr.h.

◆ operator<<() [20/21]

template<class _K , class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 527 of file Cdr.h.

◆ operator<<() [21/21]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 540 of file Cdr.h.

◆ operator=()

Cdr& eprosima::fastcdr::Cdr::operator= ( const Cdr )
privatedelete

◆ operator>>() [1/20]

Cdr& eprosima::fastcdr::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.

Definition at line 553 of file Cdr.h.

◆ operator>>() [2/20]

Cdr& eprosima::fastcdr::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.

Definition at line 565 of file Cdr.h.

◆ operator>>() [3/20]

Cdr& eprosima::fastcdr::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.

Definition at line 577 of file Cdr.h.

◆ operator>>() [4/20]

Cdr& eprosima::fastcdr::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.

Definition at line 589 of file Cdr.h.

◆ operator>>() [5/20]

Cdr& eprosima::fastcdr::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.

Definition at line 601 of file Cdr.h.

◆ operator>>() [6/20]

Cdr& eprosima::fastcdr::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.

Definition at line 613 of file Cdr.h.

◆ operator>>() [7/20]

Cdr& eprosima::fastcdr::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.

Definition at line 625 of file Cdr.h.

◆ operator>>() [8/20]

Cdr& eprosima::fastcdr::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.

Definition at line 638 of file Cdr.h.

◆ operator>>() [9/20]

Cdr& eprosima::fastcdr::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.

Definition at line 650 of file Cdr.h.

◆ operator>>() [10/20]

Cdr& eprosima::fastcdr::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.

Definition at line 662 of file Cdr.h.

◆ operator>>() [11/20]

Cdr& eprosima::fastcdr::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.

Definition at line 674 of file Cdr.h.

◆ operator>>() [12/20]

Cdr& eprosima::fastcdr::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.

Definition at line 686 of file Cdr.h.

◆ operator>>() [13/20]

Cdr& eprosima::fastcdr::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.

Definition at line 698 of file Cdr.h.

◆ operator>>() [14/20]

Cdr& eprosima::fastcdr::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.

Definition at line 711 of file Cdr.h.

◆ operator>>() [15/20]

Cdr& eprosima::fastcdr::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.

Definition at line 726 of file Cdr.h.

◆ operator>>() [16/20]

Cdr& eprosima::fastcdr::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.

Definition at line 738 of file Cdr.h.

◆ operator>>() [17/20]

Cdr& eprosima::fastcdr::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.

Definition at line 750 of file Cdr.h.

◆ operator>>() [18/20]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 779 of file Cdr.h.

◆ operator>>() [19/20]

template<class _K , class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 792 of file Cdr.h.

◆ operator>>() [20/20]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 805 of file Cdr.h.

◆ read_encapsulation()

Cdr & 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.

Definition at line 64 of file Cdr.cpp.

◆ readString()

const char * Cdr::readString ( uint32_t &  length)
private

Definition at line 1964 of file Cdr.cpp.

◆ readWString()

const std::wstring Cdr::readWString ( uint32_t &  length)
private

Definition at line 1995 of file Cdr.cpp.

◆ reset()

void Cdr::reset ( )

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

Definition at line 237 of file Cdr.cpp.

◆ resetAlignment()

void eprosima::fastcdr::Cdr::resetAlignment ( )
inline

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

Definition at line 270 of file Cdr.h.

◆ resize()

bool Cdr::resize ( size_t  minSizeInc)
private

This function resizes the internal buffer. It only applies if the FastBuffer object was created with the default constructor.

Parameters
minSizeIncMinimun size increase for the internal buffer
Returns
True if the resize was succesful, false if it was not

Definition at line 259 of file Cdr.cpp.

◆ serialize() [1/40]

Cdr& eprosima::fastcdr::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.

Definition at line 819 of file Cdr.h.

◆ serialize() [2/40]

Cdr& eprosima::fastcdr::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.

Definition at line 833 of file Cdr.h.

◆ serialize() [3/40]

Cdr & 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.

Definition at line 273 of file Cdr.cpp.

◆ serialize() [4/40]

Cdr& eprosima::fastcdr::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.

Definition at line 857 of file Cdr.h.

◆ serialize() [5/40]

Cdr& eprosima::fastcdr::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.

Definition at line 872 of file Cdr.h.

◆ serialize() [6/40]

Cdr& eprosima::fastcdr::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.

Definition at line 886 of file Cdr.h.

◆ serialize() [7/40]

Cdr& eprosima::fastcdr::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.

Definition at line 900 of file Cdr.h.

◆ serialize() [8/40]

Cdr& eprosima::fastcdr::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.

Definition at line 914 of file Cdr.h.

◆ serialize() [9/40]

Cdr & 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.

Definition at line 288 of file Cdr.cpp.

◆ serialize() [10/40]

Cdr & 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.

Definition at line 321 of file Cdr.cpp.

◆ serialize() [11/40]

Cdr& eprosima::fastcdr::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.

Definition at line 948 of file Cdr.h.

◆ serialize() [12/40]

Cdr& eprosima::fastcdr::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.

Definition at line 962 of file Cdr.h.

◆ serialize() [13/40]

Cdr & 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.

Definition at line 342 of file Cdr.cpp.

◆ serialize() [14/40]

Cdr & 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.

Definition at line 377 of file Cdr.cpp.

◆ serialize() [15/40]

Cdr& eprosima::fastcdr::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.

Definition at line 996 of file Cdr.h.

◆ serialize() [16/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1010 of file Cdr.h.

◆ serialize() [17/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1024 of file Cdr.h.

◆ serialize() [18/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1038 of file Cdr.h.

◆ serialize() [19/40]

Cdr & 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.

Definition at line 398 of file Cdr.cpp.

◆ serialize() [20/40]

Cdr & 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.

Definition at line 437 of file Cdr.cpp.

◆ serialize() [21/40]

Cdr & 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.

Definition at line 458 of file Cdr.cpp.

◆ serialize() [22/40]

Cdr & 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.

Definition at line 493 of file Cdr.cpp.

◆ serialize() [23/40]

Cdr & 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.

Definition at line 514 of file Cdr.cpp.

◆ serialize() [24/40]

Cdr & 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.

Definition at line 553 of file Cdr.cpp.

◆ serialize() [25/40]

Cdr & 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.

Definition at line 574 of file Cdr.cpp.

◆ serialize() [26/40]

Cdr & 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.

Definition at line 663 of file Cdr.cpp.

◆ serialize() [27/40]

Cdr & 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.

Definition at line 684 of file Cdr.cpp.

◆ serialize() [28/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1145 of file Cdr.h.

◆ serialize() [29/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1159 of file Cdr.h.

◆ serialize() [30/40]

Cdr & 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.

Definition at line 706 of file Cdr.cpp.

◆ serialize() [31/40]

Cdr & 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.

Definition at line 743 of file Cdr.cpp.

◆ serialize() [32/40]

Cdr & 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.

Definition at line 786 of file Cdr.cpp.

◆ serialize() [33/40]

Cdr & 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.

Definition at line 807 of file Cdr.cpp.

◆ serialize() [34/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1212 of file Cdr.h.

◆ serialize() [35/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1225 of file Cdr.h.

◆ serialize() [36/40]

Cdr& eprosima::fastcdr::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.

Definition at line 1239 of file Cdr.h.

◆ serialize() [37/40]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1300 of file Cdr.h.

◆ serialize() [38/40]

template<class _K , class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1327 of file Cdr.h.

◆ serialize() [39/40]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1376 of file Cdr.h.

◆ serialize() [40/40]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1404 of file Cdr.h.

◆ serialize_encapsulation()

Cdr & 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.

Definition at line 125 of file Cdr.cpp.

◆ serializeArray() [1/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1419 of file Cdr.h.

◆ serializeArray() [2/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1435 of file Cdr.h.

◆ serializeArray() [3/35]

Cdr & 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.

Definition at line 856 of file Cdr.cpp.

◆ serializeArray() [4/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1464 of file Cdr.h.

◆ serializeArray() [5/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1481 of file Cdr.h.

◆ serializeArray() [6/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1497 of file Cdr.h.

◆ serializeArray() [7/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1514 of file Cdr.h.

◆ serializeArray() [8/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1530 of file Cdr.h.

◆ serializeArray() [9/35]

Cdr & 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.

Definition at line 875 of file Cdr.cpp.

◆ serializeArray() [10/35]

Cdr & 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.

Definition at line 922 of file Cdr.cpp.

◆ serializeArray() [11/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1570 of file Cdr.h.

◆ serializeArray() [12/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1586 of file Cdr.h.

◆ serializeArray() [13/35]

Cdr & 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.

Definition at line 944 of file Cdr.cpp.

◆ serializeArray() [14/35]

Cdr & 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.

Definition at line 993 of file Cdr.cpp.

◆ serializeArray() [15/35]

Cdr & 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.

Definition at line 1015 of file Cdr.cpp.

◆ serializeArray() [16/35]

Cdr & 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.

Definition at line 1031 of file Cdr.cpp.

◆ serializeArray() [17/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1650 of file Cdr.h.

◆ serializeArray() [18/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1666 of file Cdr.h.

◆ serializeArray() [19/35]

Cdr & 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.

Definition at line 1053 of file Cdr.cpp.

◆ serializeArray() [20/35]

Cdr & 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.

Definition at line 1106 of file Cdr.cpp.

◆ serializeArray() [21/35]

Cdr & 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.

Definition at line 1128 of file Cdr.cpp.

◆ serializeArray() [22/35]

Cdr & 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.

Definition at line 1177 of file Cdr.cpp.

◆ serializeArray() [23/35]

Cdr & 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.

Definition at line 1199 of file Cdr.cpp.

◆ serializeArray() [24/35]

Cdr & 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.

Definition at line 1252 of file Cdr.cpp.

◆ serializeArray() [25/35]

Cdr & 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.

Definition at line 1274 of file Cdr.cpp.

◆ serializeArray() [26/35]

Cdr & 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.

Definition at line 1397 of file Cdr.cpp.

◆ serializeArray() [27/35]

Cdr & 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.

Definition at line 828 of file Cdr.cpp.

◆ serializeArray() [28/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1790 of file Cdr.h.

◆ serializeArray() [29/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1807 of file Cdr.h.

◆ serializeArray() [30/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1826 of file Cdr.h.

◆ serializeArray() [31/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1846 of file Cdr.h.

◆ serializeArray() [32/35]

Cdr& eprosima::fastcdr::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.

Definition at line 1877 of file Cdr.h.

◆ serializeArray() [33/35]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1907 of file Cdr.h.

◆ serializeArray() [34/35]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1926 of file Cdr.h.

◆ serializeArray() [35/35]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1946 of file Cdr.h.

◆ serializeBoolSequence()

Cdr & Cdr::serializeBoolSequence ( const std::vector< bool > &  vector_t)
private

Definition at line 2617 of file Cdr.cpp.

◆ serializeSequence() [1/2]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 1976 of file Cdr.h.

◆ serializeSequence() [2/2]

template<class _T >
Cdr& eprosima::fastcdr::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.

Definition at line 2006 of file Cdr.h.

◆ setDDSCdrOptions()

void Cdr::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.

Definition at line 183 of file Cdr.cpp.

◆ setDDSCdrPlFlag()

void Cdr::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.

Definition at line 172 of file Cdr.cpp.

◆ setState()

void Cdr::setState ( state state)

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

Parameters
statePrevious state that will be set.

Definition at line 228 of file Cdr.cpp.

Member Data Documentation

◆ DEFAULT_ENDIAN

const Cdr::Endianness Cdr::DEFAULT_ENDIAN = LITTLE_ENDIANNESS
static

Default endiness in the system.

Definition at line 86 of file Cdr.h.

◆ m_alignPosition

FastBuffer::iterator eprosima::fastcdr::Cdr::m_alignPosition
private

The position from where the aligment is calculated.

Definition at line 3549 of file Cdr.h.

◆ m_cdrBuffer

FastBuffer& eprosima::fastcdr::Cdr::m_cdrBuffer
private

Reference to the buffer that will be serialized/deserialized.

Definition at line 3525 of file Cdr.h.

◆ m_cdrType

CdrType eprosima::fastcdr::Cdr::m_cdrType
private

The type of CDR that will be use in serialization/deserialization.

Definition at line 3528 of file Cdr.h.

◆ m_currentPosition

FastBuffer::iterator eprosima::fastcdr::Cdr::m_currentPosition
private

The current position in the serialization/deserialization process.

Definition at line 3546 of file Cdr.h.

◆ m_endianness

uint8_t eprosima::fastcdr::Cdr::m_endianness
private

The endianness that will be applied over the buffer.

Definition at line 3537 of file Cdr.h.

◆ m_lastDataSize

size_t eprosima::fastcdr::Cdr::m_lastDataSize
private

Stores the last datasize serialized/deserialized. It's used to optimize.

Definition at line 3543 of file Cdr.h.

◆ m_lastPosition

FastBuffer::iterator eprosima::fastcdr::Cdr::m_lastPosition
private

The last position in the buffer;.

Definition at line 3552 of file Cdr.h.

◆ m_options

uint16_t eprosima::fastcdr::Cdr::m_options
private

This attribute stores the option flags when the CDR type is DDS_CDR;.

Definition at line 3534 of file Cdr.h.

◆ m_plFlag

DDSCdrPlFlag eprosima::fastcdr::Cdr::m_plFlag
private

Using DDS_CDR type, this attribute stores if the stream buffer contains a parameter list or not.

Definition at line 3531 of file Cdr.h.

◆ m_swapBytes

bool eprosima::fastcdr::Cdr::m_swapBytes
private

This attribute specifies if it is needed to swap the bytes.

Definition at line 3540 of file Cdr.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:12:56