pjmsg_mcap_wrapper
Loading...
Searching...
No Matches
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
eprosima::fastcdr::FastCdr Class Reference

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.

Definition at line 42 of file FastCdr.h.

#include <FastCdr.h>

Classes

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

Public Member Functions

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

Private Member Functions

 FastCdr (const FastCdr &)=delete
 
FastCdroperator= (const FastCdr &)=delete
 
FastCdrserialize_bool_sequence (const std::vector< bool > &vector_t)
 
FastCdrdeserialize_bool_sequence (std::vector< bool > &vector_t)
 
FastCdrdeserialize_string_sequence (std::string *&sequence_t, size_t &num_elements)
 
FastCdrdeserialize_wstring_sequence (std::wstring *&sequence_t, size_t &num_elements)
 
template<class _T , size_t _Size>
FastCdrserialize_array (const std::array< _T, _Size > *array_t, size_t num_elements)
 This function template detects the content type of the STD container array and serializes the array.
 
template<class _T , size_t _Size>
FastCdrdeserialize_array (std::array< _T, _Size > *array_t, size_t num_elements)
 This function template detects the content type of the STD container array and deserializes the array.
 
bool resize (size_t min_size_inc)
 
const char * read_string (uint32_t &length)
 
std::wstring read_wstring (uint32_t &length)
 

Private Attributes

FastBuffercdr_buffer_
 Reference to the buffer that will be serialized/deserialized.
 
FastBuffer::iterator current_position_
 The current position in the serialization/deserialization process.
 
FastBuffer::iterator last_position_
 The last position in the buffer;.
 

Constructor & Destructor Documentation

◆ FastCdr() [1/2]

FastCdr::FastCdr ( FastBuffer cdr_buffer)

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

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

Definition at line 34 of file FastCdr.cpp.

◆ FastCdr() [2/2]

eprosima::fastcdr::FastCdr::FastCdr ( const FastCdr )
privatedelete

Member Function Documentation

◆ deserialize() [1/22]

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

Definition at line 1652 of file FastCdr.h.

◆ deserialize() [2/22]

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

Definition at line 360 of file FastCdr.cpp.

◆ deserialize() [3/22]

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

Definition at line 1300 of file FastCdr.h.

◆ deserialize() [4/22]

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

Definition at line 386 of file FastCdr.cpp.

◆ deserialize() [5/22]

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

Definition at line 1471 of file FastCdr.h.

◆ deserialize() [6/22]

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

Definition at line 1450 of file FastCdr.h.

◆ deserialize() [7/22]

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

Definition at line 1345 of file FastCdr.h.

◆ deserialize() [8/22]

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

Definition at line 1379 of file FastCdr.h.

◆ deserialize() [9/22]

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

Definition at line 1429 of file FastCdr.h.

◆ deserialize() [10/22]

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

Definition at line 1319 of file FastCdr.h.

◆ deserialize() [11/22]

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

Definition at line 1492 of file FastCdr.h.

◆ deserialize() [12/22]

template<class _T , size_t _Size>
FastCdr & eprosima::fastcdr::FastCdr::deserialize ( std::array< _T, _Size > &  array_t)
inline

This function template deserializes an array.

Parameters
array_tThe variable that will store the array 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.

Definition at line 1581 of file FastCdr.h.

◆ deserialize() [13/22]

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

Definition at line 1550 of file FastCdr.h.

◆ deserialize() [14/22]

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

Definition at line 1607 of file FastCdr.h.

◆ deserialize() [15/22]

template<class _T = bool>
FastCdr & eprosima::fastcdr::FastCdr::deserialize ( std::vector< bool > &  vector_t)
inline

This function template deserializes a sequence of booleans.

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.

Definition at line 1594 of file FastCdr.h.

◆ deserialize() [16/22]

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

Definition at line 1566 of file FastCdr.h.

◆ deserialize() [17/22]

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

Definition at line 1332 of file FastCdr.h.

◆ deserialize() [18/22]

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

Definition at line 1366 of file FastCdr.h.

◆ deserialize() [19/22]

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

Definition at line 1416 of file FastCdr.h.

◆ deserialize() [20/22]

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

Definition at line 1287 of file FastCdr.h.

◆ deserialize() [21/22]

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

Definition at line 1400 of file FastCdr.h.

◆ deserialize() [22/22]

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

Definition at line 414 of file FastCdr.cpp.

◆ deserialize_array() [1/19]

template<class _T >
FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( _T *  type_t,
size_t  num_elements 
)
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.
num_elementsNumber 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.

Definition at line 1898 of file FastCdr.h.

◆ deserialize_array() [2/19]

FastCdr & FastCdr::deserialize_array ( bool *  bool_t,
size_t  num_elements 
)

This function deserializes an array of booleans.

Parameters
bool_tThe variable that will store the array of booleans read from the buffer.
num_elementsNumber 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.

Definition at line 511 of file FastCdr.cpp.

◆ deserialize_array() [3/19]

FastCdr & FastCdr::deserialize_array ( char *  char_t,
size_t  num_elements 
)

This function deserializes an array of characters.

Parameters
char_tThe variable that will store the array of characters read from the buffer.
num_elementsNumber 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.

Definition at line 540 of file FastCdr.cpp.

◆ deserialize_array() [4/19]

FastCdr & FastCdr::deserialize_array ( double *  double_t,
size_t  num_elements 
)

This function deserializes an array of doubles.

Parameters
double_tThe variable that will store the array of doubles read from the buffer.
num_elementsNumber 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.

Definition at line 637 of file FastCdr.cpp.

◆ deserialize_array() [5/19]

FastCdr & FastCdr::deserialize_array ( float *  float_t,
size_t  num_elements 
)

This function deserializes an array of floats.

Parameters
float_tThe variable that will store the array of floats read from the buffer.
num_elementsNumber 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.

Definition at line 620 of file FastCdr.cpp.

◆ deserialize_array() [6/19]

FastCdr & FastCdr::deserialize_array ( int16_t *  short_t,
size_t  num_elements 
)

This function deserializes an array of shorts.

Parameters
short_tThe variable that will store the array of shorts read from the buffer.
num_elementsNumber 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.

Definition at line 556 of file FastCdr.cpp.

◆ deserialize_array() [7/19]

FastCdr & FastCdr::deserialize_array ( int32_t *  long_t,
size_t  num_elements 
)

This function deserializes an array of longs.

Parameters
long_tThe variable that will store the array of longs read from the buffer.
num_elementsNumber 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.

Definition at line 573 of file FastCdr.cpp.

◆ deserialize_array() [8/19]

FastCdr & FastCdr::deserialize_array ( int64_t *  longlong_t,
size_t  num_elements 
)

This function deserializes an array of long longs.

Parameters
longlong_tThe variable that will store the array of long longs read from the buffer.
num_elementsNumber 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.

Definition at line 603 of file FastCdr.cpp.

◆ deserialize_array() [9/19]

FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( int8_t *  int8,
size_t  num_elements 
)
inline

This function deserializes an array of int8_t.

Parameters
int8The variable that will store the array of int8_t read from the buffer.
num_elementsNumber 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.

Definition at line 1693 of file FastCdr.h.

◆ deserialize_array() [10/19]

FastCdr & FastCdr::deserialize_array ( long double *  ldouble_t,
size_t  num_elements 
)

This function deserializes an array of long doubles.

Parameters
ldouble_tThe variable that will store the array of long doubles read from the buffer.
num_elementsNumber 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.

Definition at line 654 of file FastCdr.cpp.

◆ deserialize_array() [11/19]

template<class _T , size_t _Size>
FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( std::array< _T, _Size > *  array_t,
size_t  num_elements 
)
inlineprivate

This function template detects the content type of the STD container array and deserializes the array.

Parameters
array_tThe variable that will store the array read from the buffer.
num_elementsNumber 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.

Definition at line 2061 of file FastCdr.h.

◆ deserialize_array() [12/19]

FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( std::string string_t,
size_t  num_elements 
)
inline

This function deserializes an array of strings.

Parameters
string_tThe variable that will store the array of strings read from the buffer.
num_elementsNumber 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.

Definition at line 1841 of file FastCdr.h.

◆ deserialize_array() [13/19]

template<class _T >
FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( std::vector< _T > *  vector_t,
size_t  num_elements 
)
inline

This function template deserializes an array of sequences.

Parameters
vector_tThe variable that will store the array of sequences read from the buffer.
num_elementsNumber 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.

Definition at line 1879 of file FastCdr.h.

◆ deserialize_array() [14/19]

FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( std::wstring string_t,
size_t  num_elements 
)
inline

This function deserializes an array of wide-strings.

Parameters
string_tThe variable that will store the array of strings read from the buffer.
num_elementsNumber 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.

Definition at line 1860 of file FastCdr.h.

◆ deserialize_array() [15/19]

FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( uint16_t *  ushort_t,
size_t  num_elements 
)
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.
num_elementsNumber 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.

Definition at line 1708 of file FastCdr.h.

◆ deserialize_array() [16/19]

FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( uint32_t *  ulong_t,
size_t  num_elements 
)
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.
num_elementsNumber 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.

Definition at line 1734 of file FastCdr.h.

◆ deserialize_array() [17/19]

FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( uint64_t *  ulonglong_t,
size_t  num_elements 
)
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.
num_elementsNumber 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.

Definition at line 1771 of file FastCdr.h.

◆ deserialize_array() [18/19]

FastCdr & eprosima::fastcdr::FastCdr::deserialize_array ( uint8_t *  octet_t,
size_t  num_elements 
)
inline

This function deserializes an array of octets.

Parameters
octet_tThe variable that will store the array of octets read from the buffer.
num_elementsNumber 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.

Definition at line 1667 of file FastCdr.h.

◆ deserialize_array() [19/19]

FastCdr & FastCdr::deserialize_array ( wchar_t *  wchar,
size_t  num_elements 
)

This function deserializes an array of wide-chars.

Parameters
wcharThe variable that will store the array of wide-chars read from the buffer.
num_elementsNumber 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.

Definition at line 590 of file FastCdr.cpp.

◆ deserialize_bool_sequence()

FastCdr & FastCdr::deserialize_bool_sequence ( std::vector< bool > &  vector_t)
private

Definition at line 726 of file FastCdr.cpp.

◆ deserialize_sequence() [1/3]

template<class _T >
FastCdr & eprosima::fastcdr::FastCdr::deserialize_sequence ( _T *&  sequence_t,
size_t &  num_elements 
)
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.
num_elementsThis 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.

Definition at line 1953 of file FastCdr.h.

◆ deserialize_sequence() [2/3]

template<class _T = std::string>
FastCdr & eprosima::fastcdr::FastCdr::deserialize_sequence ( std::string *&  sequence_t,
size_t &  num_elements 
)
inline

This function template deserializes a string 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.
num_elementsThis 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.

Definition at line 1919 of file FastCdr.h.

◆ deserialize_sequence() [3/3]

template<class _T = std::wstring>
FastCdr & eprosima::fastcdr::FastCdr::deserialize_sequence ( std::wstring *&  sequence_t,
size_t &  num_elements 
)
inline

This function template deserializes a wide-string 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.
num_elementsThis 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.

Definition at line 1936 of file FastCdr.h.

◆ deserialize_string_sequence()

FastCdr & FastCdr::deserialize_string_sequence ( std::string *&  sequence_t,
size_t &  num_elements 
)
private

Definition at line 763 of file FastCdr.cpp.

◆ deserialize_wstring_sequence()

FastCdr & FastCdr::deserialize_wstring_sequence ( std::wstring *&  sequence_t,
size_t &  num_elements 
)
private

Definition at line 789 of file FastCdr.cpp.

◆ get_current_position()

char * FastCdr::get_current_position ( )

This function returns the current position in the CDR stream.

Returns
Pointer to the current position in the buffer.

Definition at line 56 of file FastCdr.cpp.

◆ get_serialized_data_length()

size_t eprosima::fastcdr::FastCdr::get_serialized_data_length ( ) const
inline

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

Returns
The length of the serialized data.

Definition at line 107 of file FastCdr.h.

◆ get_state()

FastCdr::state FastCdr::get_state ( )

This function returns the current state of the CDR stream.

Returns
The current state of the buffer.

Definition at line 61 of file FastCdr.cpp.

◆ jump()

bool FastCdr::jump ( size_t  num_bytes)

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

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

Definition at line 42 of file FastCdr.cpp.

◆ operator<<() [1/21]

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

Definition at line 374 of file FastCdr.h.

◆ operator<<() [2/21]

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

Definition at line 287 of file FastCdr.h.

◆ operator<<() [3/21]

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

Definition at line 299 of file FastCdr.h.

◆ operator<<() [4/21]

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

Definition at line 143 of file FastCdr.h.

◆ operator<<() [5/21]

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

Definition at line 263 of file FastCdr.h.

◆ operator<<() [6/21]

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

Definition at line 251 of file FastCdr.h.

◆ operator<<() [7/21]

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

Definition at line 179 of file FastCdr.h.

◆ operator<<() [8/21]

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

Definition at line 203 of file FastCdr.h.

◆ operator<<() [9/21]

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

Definition at line 239 of file FastCdr.h.

◆ operator<<() [10/21]

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

Definition at line 155 of file FastCdr.h.

◆ operator<<() [11/21]

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

Definition at line 275 of file FastCdr.h.

◆ operator<<() [12/21]

template<class _T , size_t _Size>
FastCdr & eprosima::fastcdr::FastCdr::operator<< ( const std::array< _T, _Size > &  array_t)
inline

This operator template is used to serialize arrays.

Parameters
array_tThe array 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.

Definition at line 348 of file FastCdr.h.

◆ operator<<() [13/21]

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

Definition at line 323 of file FastCdr.h.

◆ operator<<() [14/21]

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

Definition at line 361 of file FastCdr.h.

◆ operator<<() [15/21]

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

Definition at line 335 of file FastCdr.h.

◆ operator<<() [16/21]

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

Definition at line 167 of file FastCdr.h.

◆ operator<<() [17/21]

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

Definition at line 191 of file FastCdr.h.

◆ operator<<() [18/21]

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

Definition at line 227 of file FastCdr.h.

◆ operator<<() [19/21]

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

Definition at line 131 of file FastCdr.h.

◆ operator<<() [20/21]

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

Definition at line 311 of file FastCdr.h.

◆ operator<<() [21/21]

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

Definition at line 215 of file FastCdr.h.

◆ operator=()

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

◆ operator>>() [1/20]

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

Definition at line 622 of file FastCdr.h.

◆ operator>>() [2/20]

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

Definition at line 544 of file FastCdr.h.

◆ operator>>() [3/20]

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

Definition at line 399 of file FastCdr.h.

◆ operator>>() [4/20]

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

Definition at line 559 of file FastCdr.h.

◆ operator>>() [5/20]

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

Definition at line 519 of file FastCdr.h.

◆ operator>>() [6/20]

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

Definition at line 507 of file FastCdr.h.

◆ operator>>() [7/20]

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

Definition at line 435 of file FastCdr.h.

◆ operator>>() [8/20]

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

Definition at line 459 of file FastCdr.h.

◆ operator>>() [9/20]

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

Definition at line 495 of file FastCdr.h.

◆ operator>>() [10/20]

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

Definition at line 411 of file FastCdr.h.

◆ operator>>() [11/20]

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

Definition at line 531 of file FastCdr.h.

◆ operator>>() [12/20]

template<class _T , size_t _Size>
FastCdr & eprosima::fastcdr::FastCdr::operator>> ( std::array< _T, _Size > &  array_t)
inline

This operator template is used to deserialize arrays.

Parameters
array_tThe variable that will store the array 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.

Definition at line 596 of file FastCdr.h.

◆ operator>>() [13/20]

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

Definition at line 571 of file FastCdr.h.

◆ operator>>() [14/20]

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

Definition at line 609 of file FastCdr.h.

◆ operator>>() [15/20]

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

Definition at line 583 of file FastCdr.h.

◆ operator>>() [16/20]

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

Definition at line 423 of file FastCdr.h.

◆ operator>>() [17/20]

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

Definition at line 447 of file FastCdr.h.

◆ operator>>() [18/20]

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

Definition at line 483 of file FastCdr.h.

◆ operator>>() [19/20]

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

Definition at line 387 of file FastCdr.h.

◆ operator>>() [20/20]

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

Definition at line 471 of file FastCdr.h.

◆ read_string()

const char * FastCdr::read_string ( uint32_t &  length)
private

Definition at line 452 of file FastCdr.cpp.

◆ read_wstring()

std::wstring FastCdr::read_wstring ( uint32_t &  length)
private

Definition at line 480 of file FastCdr.cpp.

◆ reset()

void FastCdr::reset ( )

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

Definition at line 72 of file FastCdr.cpp.

◆ resize()

bool FastCdr::resize ( size_t  min_size_inc)
private

Definition at line 77 of file FastCdr.cpp.

◆ serialize() [1/22]

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

Definition at line 994 of file FastCdr.h.

◆ serialize() [2/22]

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

Definition at line 90 of file FastCdr.cpp.

◆ serialize() [3/22]

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

Definition at line 109 of file FastCdr.cpp.

◆ serialize() [4/22]

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

Definition at line 649 of file FastCdr.h.

◆ serialize() [5/22]

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

Definition at line 817 of file FastCdr.h.

◆ serialize() [6/22]

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

Definition at line 796 of file FastCdr.h.

◆ serialize() [7/22]

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

Definition at line 694 of file FastCdr.h.

◆ serialize() [8/22]

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

Definition at line 728 of file FastCdr.h.

◆ serialize() [9/22]

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

Definition at line 775 of file FastCdr.h.

◆ serialize() [10/22]

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

Definition at line 668 of file FastCdr.h.

◆ serialize() [11/22]

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

Definition at line 838 of file FastCdr.h.

◆ serialize() [12/22]

template<class _T , size_t _Size>
FastCdr & eprosima::fastcdr::FastCdr::serialize ( const std::array< _T, _Size > &  array_t)
inline

This function template serializes an array.

Parameters
array_tThe array 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.

Definition at line 925 of file FastCdr.h.

◆ serialize() [13/22]

FastCdr & eprosima::fastcdr::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.
exception::BadParamExceptionThis exception is thrown when trying to serialize a string with null characters.

Definition at line 891 of file FastCdr.h.

◆ serialize() [14/22]

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

Definition at line 951 of file FastCdr.h.

◆ serialize() [15/22]

template<class _T = bool>
FastCdr & eprosima::fastcdr::FastCdr::serialize ( const std::vector< bool > &  vector_t)
inline

This function template serializes a sequence of booleans.

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.

Definition at line 938 of file FastCdr.h.

◆ serialize() [16/22]

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

Definition at line 912 of file FastCdr.h.

◆ serialize() [17/22]

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

Definition at line 681 of file FastCdr.h.

◆ serialize() [18/22]

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

Definition at line 715 of file FastCdr.h.

◆ serialize() [19/22]

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

Definition at line 762 of file FastCdr.h.

◆ serialize() [20/22]

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

Definition at line 636 of file FastCdr.h.

◆ serialize() [21/22]

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

Definition at line 143 of file FastCdr.cpp.

◆ serialize() [22/22]

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

Definition at line 749 of file FastCdr.h.

◆ serialize_array() [1/19]

template<class _T >
FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const _T *  type_t,
size_t  num_elements 
)
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.
num_elementsNumber 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.

Definition at line 1240 of file FastCdr.h.

◆ serialize_array() [2/19]

FastCdr & FastCdr::serialize_array ( const bool *  bool_t,
size_t  num_elements 
)

This function serializes an array of booleans.

Parameters
bool_tThe array of booleans that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 183 of file FastCdr.cpp.

◆ serialize_array() [3/19]

FastCdr & FastCdr::serialize_array ( const char *  char_t,
size_t  num_elements 
)

This function serializes an array of characters.

Parameters
char_tThe array of characters that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 208 of file FastCdr.cpp.

◆ serialize_array() [4/19]

FastCdr & FastCdr::serialize_array ( const double *  double_t,
size_t  num_elements 
)

This function serializes an array of doubles.

Parameters
double_tThe array of doubles that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 303 of file FastCdr.cpp.

◆ serialize_array() [5/19]

FastCdr & FastCdr::serialize_array ( const float *  float_t,
size_t  num_elements 
)

This function serializes an array of floats.

Parameters
float_tThe array of floats that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 286 of file FastCdr.cpp.

◆ serialize_array() [6/19]

FastCdr & FastCdr::serialize_array ( const int16_t *  short_t,
size_t  num_elements 
)

This function serializes an array of shorts.

Parameters
short_tThe array of shorts that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 224 of file FastCdr.cpp.

◆ serialize_array() [7/19]

FastCdr & FastCdr::serialize_array ( const int32_t *  long_t,
size_t  num_elements 
)

This function serializes an array of longs.

Parameters
long_tThe array of longs that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 241 of file FastCdr.cpp.

◆ serialize_array() [8/19]

FastCdr & FastCdr::serialize_array ( const int64_t *  longlong_t,
size_t  num_elements 
)

This function serializes an array of long longs.

Parameters
longlong_tThe array of long longs that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 269 of file FastCdr.cpp.

◆ serialize_array() [9/19]

FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const int8_t *  int8,
size_t  num_elements 
)
inline

This function serializes an array of int8_t.

Parameters
int8The sequence of int8_t that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 1035 of file FastCdr.h.

◆ serialize_array() [10/19]

FastCdr & FastCdr::serialize_array ( const long double *  ldouble_t,
size_t  num_elements 
)

This function serializes an array of long doubles.

Parameters
ldouble_tThe array of long doubles that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 320 of file FastCdr.cpp.

◆ serialize_array() [11/19]

template<class _T , size_t _Size>
FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const std::array< _T, _Size > *  array_t,
size_t  num_elements 
)
inlineprivate

This function template detects the content type of the STD container array and serializes the array.

Parameters
array_tThe array that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 2046 of file FastCdr.h.

◆ serialize_array() [12/19]

FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const std::string string_t,
size_t  num_elements 
)
inline

This function serializes an array of strings.

Parameters
string_tThe array of strings that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 1183 of file FastCdr.h.

◆ serialize_array() [13/19]

template<class _T >
FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const std::vector< _T > *  vector_t,
size_t  num_elements 
)
inline

This function template serializes an array of sequences.

Parameters
vector_tThe array of sequences that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 1221 of file FastCdr.h.

◆ serialize_array() [14/19]

FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const std::wstring string_t,
size_t  num_elements 
)
inline

This function serializes an array of wstrings.

Parameters
string_tThe array of wstrings that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 1202 of file FastCdr.h.

◆ serialize_array() [15/19]

FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const uint16_t *  ushort_t,
size_t  num_elements 
)
inline

This function serializes an array of unsigned shorts.

Parameters
ushort_tThe array of unsigned shorts that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 1050 of file FastCdr.h.

◆ serialize_array() [16/19]

FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const uint32_t *  ulong_t,
size_t  num_elements 
)
inline

This function serializes an array of unsigned longs.

Parameters
ulong_tThe array of unsigned longs that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 1076 of file FastCdr.h.

◆ serialize_array() [17/19]

FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const uint64_t *  ulonglong_t,
size_t  num_elements 
)
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.
num_elementsNumber 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.

Definition at line 1113 of file FastCdr.h.

◆ serialize_array() [18/19]

FastCdr & eprosima::fastcdr::FastCdr::serialize_array ( const uint8_t *  octet_t,
size_t  num_elements 
)
inline

This function serializes an array of octets.

Parameters
octet_tThe sequence of octets that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 1009 of file FastCdr.h.

◆ serialize_array() [19/19]

FastCdr & FastCdr::serialize_array ( const wchar_t *  wchar,
size_t  num_elements 
)

This function serializes an array of wide-chars.

Parameters
wcharThe array of wide-chars that will be serialized in the buffer.
num_elementsNumber 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.

Definition at line 258 of file FastCdr.cpp.

◆ serialize_bool_sequence()

FastCdr & FastCdr::serialize_bool_sequence ( const std::vector< bool > &  vector_t)
private

Definition at line 694 of file FastCdr.cpp.

◆ serialize_sequence()

template<class _T >
FastCdr & eprosima::fastcdr::FastCdr::serialize_sequence ( const _T *  sequence_t,
size_t  num_elements 
)
inline

This function template serializes a raw sequence.

Parameters
sequence_tPointer to the sequence that will be serialized in the buffer.
num_elementsThe 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.

Definition at line 1259 of file FastCdr.h.

◆ set_state()

void FastCdr::set_state ( FastCdr::state state)

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

Parameters
statePrevious state that will be set again.

Definition at line 66 of file FastCdr.cpp.

Member Data Documentation

◆ cdr_buffer_

FastBuffer& eprosima::fastcdr::FastCdr::cdr_buffer_
private

Reference to the buffer that will be serialized/deserialized.

Definition at line 2078 of file FastCdr.h.

◆ current_position_

FastBuffer::iterator eprosima::fastcdr::FastCdr::current_position_
private

The current position in the serialization/deserialization process.

Definition at line 2081 of file FastCdr.h.

◆ last_position_

FastBuffer::iterator eprosima::fastcdr::FastCdr::last_position_
private

The last position in the buffer;.

Definition at line 2084 of file FastCdr.h.


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