Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
eprosima::fastcdr::FastCdr Class Reference

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

#include <FastCdr.h>

Classes

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

Public Member Functions

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

Private Member Functions

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. More...
 
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)
 
 FastCdr (const FastCdr &)=delete
 
FastCdroperator= (const FastCdr &)=delete
 
const char * read_string (uint32_t &length)
 
std::wstring read_wstring (uint32_t &length)
 
bool resize (size_t min_size_inc)
 
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. More...
 
FastCdrserialize_bool_sequence (const std::vector< bool > &vector_t)
 

Private Attributes

FastBuffercdr_buffer_
 Reference to the buffer that will be serialized/deserialized. More...
 
FastBuffer::iterator current_position_
 The current position in the serialization/deserialization process. More...
 
FastBuffer::iterator last_position_
 The last position in the buffer;. 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.

Definition at line 40 of file FastCdr.h.

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 1641 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 1289 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 1460 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 1439 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 1334 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 1368 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 1418 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 1308 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 1481 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 1570 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 1539 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 1596 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 1583 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 1555 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 1321 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 1355 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 1405 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 1276 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 1389 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 1887 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 1682 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 2050 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 1830 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 1868 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 1849 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 1697 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 1723 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 1760 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 1656 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 1942 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 1908 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 1925 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 105 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 372 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 285 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 297 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 141 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 261 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 249 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 177 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 201 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 237 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 153 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 273 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 346 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 321 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 359 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 333 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 165 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 189 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 225 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 129 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 309 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 213 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 620 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 542 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 397 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 557 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 517 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 505 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 433 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 457 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 493 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 409 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 529 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 594 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 569 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 607 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 581 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 421 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 445 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 481 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 385 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 469 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 983 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 647 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 815 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 794 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 692 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 726 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 773 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 666 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 836 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 914 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.

Definition at line 888 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 940 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 927 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 901 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 679 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 713 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 760 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 634 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 747 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 1229 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 1024 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 2035 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 1172 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 1210 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 1191 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 1039 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 1065 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 1102 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 998 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 1248 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 2067 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 2070 of file FastCdr.h.

◆ last_position_

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

The last position in the buffer;.

Definition at line 2073 of file FastCdr.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:52