Fast CDR  Version 1.0.23
Fast CDR
FastCdr Class Reference

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

#include <FastCdr.h>

Classes

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

Public Member Functions

 FastCdr (FastBuffer &cdrBuffer)
 This constructor creates a eprosima::fastcdr::FastCdr object that can serialize/deserialize the assigned buffer. More...
 
bool jump (size_t numBytes)
 This function skips a number of bytes in the CDR stream buffer. More...
 
void reset ()
 This function resets the current position in the buffer to the begining. More...
 
char * getCurrentPosition ()
 This function returns the current position in the CDR stream. More...
 
size_t getSerializedDataLength () const
 This function returns the length of the serialized data inside the stream. More...
 
FastCdr::state getState ()
 This function returns the current state of the CDR stream. More...
 
void setState (FastCdr::state &state)
 This function sets a previous state of the CDR stream;. More...
 
FastCdroperator<< (const uint8_t octet_t)
 This operator serializes an octet. More...
 
FastCdroperator<< (const char char_t)
 This operator serializes a character. More...
 
FastCdroperator<< (const int8_t int8)
 This operator serializes a int8_t. More...
 
FastCdroperator<< (const uint16_t ushort_t)
 This operator serializes an unsigned short. More...
 
FastCdroperator<< (const int16_t short_t)
 This operator serializes a short. More...
 
FastCdroperator<< (const uint32_t ulong_t)
 This operator serializes an unsigned long. More...
 
FastCdroperator<< (const int32_t long_t)
 This operator serializes a long. More...
 
FastCdroperator<< (const wchar_t wchar)
 This operator serializes a wide-char. More...
 
FastCdroperator<< (const uint64_t ulonglong_t)
 This operator serializes an unsigned long long. More...
 
FastCdroperator<< (const int64_t longlong_t)
 This operator serializes a long long. More...
 
FastCdroperator<< (const float float_t)
 This operator serializes a float. More...
 
FastCdroperator<< (const double double_t)
 This operator serializes a ldouble. More...
 
FastCdroperator<< (const long double ldouble_t)
 This operator serializes a long double. More...
 
FastCdroperator<< (const bool bool_t)
 This operator serializes a boolean. More...
 
FastCdroperator<< (const char *string_t)
 This operator serializes a null-terminated string. More...
 
FastCdroperator<< (const wchar_t *string_t)
 This operator serializes a null-terminated wide-string. More...
 
FastCdroperator<< (const std::string &string_t)
 This operator serializes a string. More...
 
FastCdroperator<< (const std::wstring &string_t)
 This operator serializes a wstring. More...
 
template<class _T >
FastCdroperator<< (const std::vector< _T > &vector_t)
 This operator template is used to serialize sequences. More...
 
template<class _T >
FastCdroperator<< (const _T &type_t)
 This operator template is used to serialize non-basic types. More...
 
FastCdroperator>> (uint8_t &octet_t)
 This operator deserializes an octet. More...
 
FastCdroperator>> (char &char_t)
 This operator deserializes a character. More...
 
FastCdroperator>> (int8_t &int8)
 This operator deserializes an int8_t. More...
 
FastCdroperator>> (uint16_t &ushort_t)
 This operator deserializes an unsigned short. More...
 
FastCdroperator>> (int16_t &short_t)
 This operator deserializes a short. More...
 
FastCdroperator>> (uint32_t &ulong_t)
 This operator deserializes an unsigned long. More...
 
FastCdroperator>> (int32_t &long_t)
 This operator deserializes a long. More...
 
FastCdroperator>> (wchar_t &wchar)
 This operator deserializes a wide-char. More...
 
FastCdroperator>> (uint64_t &ulonglong_t)
 This operator deserializes an unsigned long long. More...
 
FastCdroperator>> (int64_t &longlong_t)
 This operator deserializes a long long. More...
 
FastCdroperator>> (float &float_t)
 This operator deserializes a float. More...
 
FastCdroperator>> (double &double_t)
 This operator deserializes a double. More...
 
FastCdroperator>> (long double &ldouble_t)
 This operator deserializes a long double. More...
 
FastCdroperator>> (bool &bool_t)
 This operator deserializes a boolean. More...
 
FastCdroperator>> (char *&string_t)
 This operator deserializes a null-terminated c-string. More...
 
FastCdroperator>> (std::string &string_t)
 This operator deserializes a string. More...
 
FastCdroperator>> (std::wstring &string_t)
 This operator deserializes a wstring. More...
 
template<class _T >
FastCdroperator>> (std::vector< _T > &vector_t)
 This operator template is used to deserialize sequences. More...
 
template<class _T >
FastCdroperator>> (_T &type_t)
 This operator template is used to deserialize non-basic types. More...
 
FastCdrserialize (const uint8_t octet_t)
 This function serializes an octet. More...
 
FastCdrserialize (const char char_t)
 This function serializes a character. More...
 
FastCdrserialize (const int8_t int8)
 This function serializes an int8_t. More...
 
FastCdrserialize (const uint16_t ushort_t)
 This function serializes an unsigned short. More...
 
FastCdrserialize (const int16_t short_t)
 This function serializes a short. More...
 
FastCdrserialize (const uint32_t ulong_t)
 This function serializes an unsigned long. More...
 
FastCdrserialize (const int32_t long_t)
 This function serializes a long. More...
 
FastCdrserialize (const wchar_t wchar)
 This function serializes a wide-char. More...
 
FastCdrserialize (const uint64_t ulonglong_t)
 This function serializes an unsigned long long. More...
 
FastCdrserialize (const int64_t longlong_t)
 This function serializes a long long. More...
 
FastCdrserialize (const float float_t)
 This function serializes a float. More...
 
FastCdrserialize (const double double_t)
 This function serializes a double. More...
 
FastCdrserialize (const long double ldouble_t)
 This function serializes a long double. More...
 
FastCdrserialize (const bool bool_t)
 This function serializes a boolean. More...
 
FastCdrserialize (const char *string_t)
 This function serializes a string. More...
 
FastCdrserialize (const wchar_t *string_t)
 This function serializes a wstring. More...
 
FastCdrserialize (const std::string &string_t)
 This function serializes a std::string. More...
 
FastCdrserialize (const std::wstring &string_t)
 This function serializes a std::wstring. More...
 
template<class _T >
FastCdrserialize (const std::vector< _T > &vector_t)
 This function template serializes a sequence. More...
 
template<class _T >
FastCdrserialize (const _T &type_t)
 This function template serializes a non-basic type. More...
 
FastCdrserializeArray (const uint8_t *octet_t, size_t numElements)
 This function serializes an array of octets. More...
 
FastCdrserializeArray (const char *char_t, size_t numElements)
 This function serializes an array of characters. More...
 
FastCdrserializeArray (const int8_t *int8, size_t numElements)
 This function serializes an array of int8_t. More...
 
FastCdrserializeArray (const uint16_t *ushort_t, size_t numElements)
 This function serializes an array of unsigned shorts. More...
 
FastCdrserializeArray (const int16_t *short_t, size_t numElements)
 This function serializes an array of shorts. More...
 
FastCdrserializeArray (const uint32_t *ulong_t, size_t numElements)
 This function serializes an array of unsigned longs. More...
 
FastCdrserializeArray (const int32_t *long_t, size_t numElements)
 This function serializes an array of longs. More...
 
FastCdrserializeArray (const wchar_t *wchar, size_t numElements)
 This function serializes an array of wide-chars. More...
 
FastCdrserializeArray (const uint64_t *ulonglong_t, size_t numElements)
 This function serializes an array of unsigned long longs. More...
 
FastCdrserializeArray (const int64_t *longlong_t, size_t numElements)
 This function serializes an array of long longs. More...
 
FastCdrserializeArray (const float *float_t, size_t numElements)
 This function serializes an array of floats. More...
 
FastCdrserializeArray (const double *double_t, size_t numElements)
 This function serializes an array of doubles. More...
 
FastCdrserializeArray (const long double *ldouble_t, size_t numElements)
 This function serializes an array of long doubles. More...
 
FastCdrserializeArray (const bool *bool_t, size_t numElements)
 This function serializes an array of booleans. More...
 
FastCdrserializeArray (const std::string *string_t, size_t numElements)
 This function serializes an array of strings. More...
 
FastCdrserializeArray (const std::wstring *string_t, size_t numElements)
 This function serializes an array of wstrings. More...
 
template<class _T >
FastCdrserializeArray (const std::vector< _T > *vector_t, size_t numElements)
 This function template serializes an array of sequences. More...
 
template<class _T >
FastCdrserializeArray (const _T *type_t, size_t numElements)
 This function template serializes an array of non-basic type objects. More...
 
template<class _T >
FastCdrserializeSequence (const _T *sequence_t, size_t numElements)
 This function template serializes a raw sequence. More...
 
FastCdrdeserialize (uint8_t &octet_t)
 This function deserializes an octet. More...
 
FastCdrdeserialize (char &char_t)
 This function deserializes a character. More...
 
FastCdrdeserialize (int8_t &int8)
 This function deserializes an int8_t. More...
 
FastCdrdeserialize (uint16_t &ushort_t)
 This function deserializes an unsigned short. More...
 
FastCdrdeserialize (int16_t &short_t)
 This function deserializes a short. More...
 
FastCdrdeserialize (uint32_t &ulong_t)
 This function deserializes an unsigned long. More...
 
FastCdrdeserialize (int32_t &long_t)
 This function deserializes a long. More...
 
FastCdrdeserialize (wchar_t &wchar)
 This function deserializes a wide-char. More...
 
FastCdrdeserialize (uint64_t &ulonglong_t)
 This function deserializes an unsigned long long. More...
 
FastCdrdeserialize (int64_t &longlong_t)
 This function deserializes a long long. More...
 
FastCdrdeserialize (float &float_t)
 This function deserializes a float. More...
 
FastCdrdeserialize (double &double_t)
 This function deserializes a double. More...
 
FastCdrdeserialize (long double &ldouble_t)
 This function deserializes a long double. More...
 
FastCdrdeserialize (bool &bool_t)
 This function deserializes a boolean. More...
 
FastCdrdeserialize (char *&string_t)
 This function deserializes a string. More...
 
FastCdrdeserialize (wchar_t *&string_t)
 This function deserializes a wide string. More...
 
FastCdrdeserialize (std::string &string_t)
 This function deserializes a std::string. More...
 
FastCdrdeserialize (std::wstring &string_t)
 This function deserializes a std::wstring. More...
 
template<class _T >
FastCdrdeserialize (std::vector< _T > &vector_t)
 This function template deserializes a sequence. More...
 
template<class _T >
FastCdrdeserialize (_T &type_t)
 This function template deserializes a non-basic type object. More...
 
FastCdrdeserializeArray (uint8_t *octet_t, size_t numElements)
 This function deserializes an array of octets. More...
 
FastCdrdeserializeArray (char *char_t, size_t numElements)
 This function deserializes an array of characters. More...
 
FastCdrdeserializeArray (int8_t *int8, size_t numElements)
 This function deserializes an array of int8_t. More...
 
FastCdrdeserializeArray (uint16_t *ushort_t, size_t numElements)
 This function deserializes an array of unsigned shorts. More...
 
FastCdrdeserializeArray (int16_t *short_t, size_t numElements)
 This function deserializes an array of shorts. More...
 
FastCdrdeserializeArray (uint32_t *ulong_t, size_t numElements)
 This function deserializes an array of unsigned longs. More...
 
FastCdrdeserializeArray (int32_t *long_t, size_t numElements)
 This function deserializes an array of longs. More...
 
FastCdrdeserializeArray (wchar_t *wchar, size_t numElements)
 This function deserializes an array of wide-chars. More...
 
FastCdrdeserializeArray (uint64_t *ulonglong_t, size_t numElements)
 This function deserializes an array of unsigned long longs. More...
 
FastCdrdeserializeArray (int64_t *longlong_t, size_t numElements)
 This function deserializes an array of long longs. More...
 
FastCdrdeserializeArray (float *float_t, size_t numElements)
 This function deserializes an array of floats. More...
 
FastCdrdeserializeArray (double *double_t, size_t numElements)
 This function deserializes an array of doubles. More...
 
FastCdrdeserializeArray (long double *ldouble_t, size_t numElements)
 This function deserializes an array of long doubles. More...
 
FastCdrdeserializeArray (bool *bool_t, size_t numElements)
 This function deserializes an array of booleans. More...
 
FastCdrdeserializeArray (std::string *string_t, size_t numElements)
 This function deserializes an array of strings. More...
 
FastCdrdeserializeArray (std::wstring *string_t, size_t numElements)
 This function deserializes an array of wide-strings. More...
 
template<class _T >
FastCdrdeserializeArray (std::vector< _T > *vector_t, size_t numElements)
 This function template deserializes an array of sequences. More...
 
template<class _T >
FastCdrdeserializeArray (_T *type_t, size_t numElements)
 This function template deserializes an array of non-basic type objects. More...
 
template<class _T >
FastCdrdeserializeSequence (_T *&sequence_t, size_t &numElements)
 This function template deserializes a raw sequence. More...
 

Detailed Description

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

This modified CDR protocol provides a serialization mechanism much faster than common CDR protocol, because it doesn't use alignment.

Constructor & Destructor Documentation

◆ FastCdr()

FastCdr ( FastBuffer cdrBuffer)

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

Parameters
cdrBufferA reference to the buffer that contains (or will contain) the CDR representation.

Member Function Documentation

◆ deserialize() [1/20]

FastCdr& deserialize ( _T &  type_t)
inline

This function template deserializes a non-basic type object.

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

◆ deserialize() [2/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize in an invalid value.

◆ deserialize() [3/20]

FastCdr& deserialize ( char &  char_t)
inline

This function deserializes a character.

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

◆ deserialize() [4/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [5/20]

FastCdr& deserialize ( double &  double_t)
inline

This function deserializes a double.

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

◆ deserialize() [6/20]

FastCdr& deserialize ( float &  float_t)
inline

This function deserializes a float.

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

◆ deserialize() [7/20]

FastCdr& deserialize ( int16_t &  short_t)
inline

This function deserializes a short.

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

◆ deserialize() [8/20]

FastCdr& deserialize ( int32_t &  long_t)
inline

This function deserializes a long.

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

◆ deserialize() [9/20]

FastCdr& deserialize ( int64_t &  longlong_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [10/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [11/20]

FastCdr& deserialize ( long double &  ldouble_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [12/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [13/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [14/20]

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

This function deserializes a std::wstring.

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

◆ deserialize() [15/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [16/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [17/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [18/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [19/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserialize() [20/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [1/18]

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

This function template deserializes an array of non-basic type 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [2/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [3/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [4/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [5/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [6/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [7/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [8/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [9/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [10/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [11/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [12/18]

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

This function template deserializes an array of sequences.

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

◆ deserializeArray() [13/18]

FastCdr& 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 strings read from the buffer.
numElementsNumber of the elements in the array.
Returns
Reference to the eprosima::fastcdr::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [14/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [15/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [16/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [17/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeArray() [18/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ deserializeSequence()

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ getCurrentPosition()

char* getCurrentPosition ( )

This function returns the current position in the CDR stream.

Returns
Pointer to the current position in the buffer.

◆ getSerializedDataLength()

size_t getSerializedDataLength ( ) const
inline

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

Returns
The length of the serialized data.

◆ getState()

FastCdr::state getState ( )

This function returns the current state of the CDR stream.

Returns
The current state of the buffer.

◆ jump()

bool jump ( size_t  numBytes)

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

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

◆ operator<<() [1/20]

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

This operator template is used to serialize non-basic types.

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

◆ operator<<() [2/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [3/20]

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

This operator serializes a null-terminated string.

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

◆ operator<<() [4/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [5/20]

FastCdr& operator<< ( const double  double_t)
inline

This operator serializes a ldouble.

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

◆ operator<<() [6/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [7/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [8/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [9/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [10/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [11/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [12/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [13/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [14/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [15/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [16/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [17/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [18/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator<<() [19/20]

FastCdr& operator<< ( const wchar_t *  string_t)
inline

This operator serializes a null-terminated wide-string.

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

◆ operator<<() [20/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ operator>>() [1/19]

FastCdr& operator>> ( _T &  type_t)
inline

This operator template is used to deserialize non-basic types.

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

◆ operator>>() [2/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize in an invalid value.

◆ operator>>() [3/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [4/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize a position that exceeds the internal memory size.
exception::BadParamExceptionThis exception is thrown when trying to deserialize an invalid value.

◆ operator>>() [5/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [6/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [7/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [8/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [9/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [10/19]

FastCdr& operator>> ( int8_t &  int8)
inline

This operator deserializes an int8_t.

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

◆ operator>>() [11/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [12/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [13/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [14/19]

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

This operator deserializes a wstring.

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

◆ operator>>() [15/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [16/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [17/19]

FastCdr& operator>> ( uint64_t &  ulonglong_t)
inline

This operator 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [18/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ operator>>() [19/19]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

◆ reset()

void reset ( )

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

◆ serialize() [1/20]

FastCdr& serialize ( const _T &  type_t)
inline

This function template serializes a non-basic type.

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

◆ serialize() [2/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [3/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [4/20]

FastCdr& serialize ( const char  char_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [5/20]

FastCdr& serialize ( const double  double_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [6/20]

FastCdr& serialize ( const float  float_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [7/20]

FastCdr& serialize ( const int16_t  short_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [8/20]

FastCdr& serialize ( const int32_t  long_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [9/20]

FastCdr& serialize ( const int64_t  longlong_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [10/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [11/20]

FastCdr& serialize ( const long double  ldouble_t)
inline

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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [12/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [13/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [14/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [15/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [16/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [17/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [18/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [19/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serialize() [20/20]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [1/18]

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

This function template serializes an array of non-basic type 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [2/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [3/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [4/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [5/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [6/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [7/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [8/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [9/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [10/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [11/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [12/18]

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

This function template serializes an array of sequences.

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

◆ serializeArray() [13/18]

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

This function serializes an array of wstrings.

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

◆ serializeArray() [14/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [15/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [16/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [17/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeArray() [18/18]

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ serializeSequence()

FastCdr& 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::FastCdr object.
Exceptions
exception::NotEnoughMemoryExceptionThis exception is thrown when trying to serialize in a position that exceeds the internal memory size.

◆ setState()

void setState ( FastCdr::state state)

This function sets a previous state of the CDR stream;.

Parameters
statePrevious state that will be set again.

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