| Fast CDR Version 2.3.5 Fast CDR

Loading...
Searching...
No Matches
FastCdr Class Reference
FastCDR Serializer API Reference

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

`#include <FastCdr.h>`

## Classes

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

## Public Member Functions

| FastCdr (FastBuffer &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;.
FastCdr & | operator<< (const uint8_t octet_t)
| This operator serializes an octet.
FastCdr & | operator<< (const char char_t)
| This operator serializes a character.
FastCdr & | operator<< (const int8_t int8)
| This operator serializes a int8_t.
FastCdr & | operator<< (const uint16_t ushort_t)
| This operator serializes an unsigned short.
FastCdr & | operator<< (const int16_t short_t)
| This operator serializes a short.
FastCdr & | operator<< (const uint32_t ulong_t)
| This operator serializes an unsigned long.
FastCdr & | operator<< (const int32_t long_t)
| This operator serializes a long.
FastCdr & | operator<< (const wchar_t wchar)
| This operator serializes a wide-char.
FastCdr & | operator<< (const uint64_t ulonglong_t)
| This operator serializes an unsigned long long.
FastCdr & | operator<< (const int64_t longlong_t)
| This operator serializes a long long.
FastCdr & | operator<< (const float float_t)
| This operator serializes a float.
FastCdr & | operator<< (const double double_t)
| This operator serializes a ldouble.
FastCdr & | operator<< (const long double ldouble_t)
| This operator serializes a long double.
FastCdr & | operator<< (const bool bool_t)
| This operator serializes a boolean.
FastCdr & | operator<< (const char *string_t)
| This operator serializes a null-terminated string.
FastCdr & | operator<< (const wchar_t *string_t)
| This operator serializes a null-terminated wide-string.
FastCdr & | operator<< (const std::string &string_t)
| This operator serializes a string.
FastCdr & | operator<< (const std::wstring &string_t)
| This operator serializes a wstring.
template<class _T, size_t _Size>
FastCdr & | operator<< (const std::array< _T, _Size > &array_t)
| This operator template is used to serialize arrays.
template<class _T>
FastCdr & | operator<< (const std::vector< _T > &vector_t)
| This operator template is used to serialize sequences.
template<class _T>
FastCdr & | operator<< (const _T &type_t)
| This operator template is used to serialize non-basic types.
FastCdr & | operator>> (uint8_t &octet_t)
| This operator deserializes an octet.
FastCdr & | operator>> (char &char_t)
| This operator deserializes a character.
FastCdr & | operator>> (int8_t &int8)
| This operator deserializes an int8_t.
FastCdr & | operator>> (uint16_t &ushort_t)
| This operator deserializes an unsigned short.
FastCdr & | operator>> (int16_t &short_t)
| This operator deserializes a short.
FastCdr & | operator>> (uint32_t &ulong_t)
| This operator deserializes an unsigned long.
FastCdr & | operator>> (int32_t &long_t)
| This operator deserializes a long.
FastCdr & | operator>> (wchar_t &wchar)
| This operator deserializes a wide-char.
FastCdr & | operator>> (uint64_t &ulonglong_t)
| This operator deserializes an unsigned long long.
FastCdr & | operator>> (int64_t &longlong_t)
| This operator deserializes a long long.
FastCdr & | operator>> (float &float_t)
| This operator deserializes a float.
FastCdr & | operator>> (double &double_t)
| This operator deserializes a double.
FastCdr & | operator>> (long double &ldouble_t)
| This operator deserializes a long double.
FastCdr & | operator>> (bool &bool_t)
| This operator deserializes a boolean.
FastCdr & | operator>> (char *&string_t)
| This operator deserializes a null-terminated c-string.
FastCdr & | operator>> (std::string &string_t)
| This operator deserializes a string.
FastCdr & | operator>> (std::wstring &string_t)
| This operator deserializes a wstring.
template<class _T, size_t _Size>
FastCdr & | operator>> (std::array< _T, _Size > &array_t)
| This operator template is used to deserialize arrays.
template<class _T>
FastCdr & | operator>> (std::vector< _T > &vector_t)
| This operator template is used to deserialize sequences.
template<class _T>
FastCdr & | operator>> (_T &type_t)
| This operator template is used to deserialize non-basic types.
FastCdr & | serialize (const uint8_t octet_t)
| This function serializes an octet.
FastCdr & | serialize (const char char_t)
| This function serializes a character.
FastCdr & | serialize (const int8_t int8)
| This function serializes an int8_t.
FastCdr & | serialize (const uint16_t ushort_t)
| This function serializes an unsigned short.
FastCdr & | serialize (const int16_t short_t)
| This function serializes a short.
FastCdr & | serialize (const uint32_t ulong_t)
| This function serializes an unsigned long.
FastCdr & | serialize (const int32_t long_t)
| This function serializes a long.
FastCdr & | serialize (const wchar_t wchar)
| This function serializes a wide-char.
FastCdr & | serialize (const uint64_t ulonglong_t)
| This function serializes an unsigned long long.
FastCdr & | serialize (const int64_t longlong_t)
| This function serializes a long long.
FastCdr & | serialize (const float float_t)
| This function serializes a float.
FastCdr & | serialize (const double double_t)
| This function serializes a double.
FastCdr & | serialize (const long double ldouble_t)
| This function serializes a long double.
FastCdr & | serialize (const bool bool_t)
| This function serializes a boolean.
FastCdr & | serialize (const char *string_t)
| This function serializes a string.
FastCdr & | serialize (const wchar_t *string_t)
| This function serializes a wstring.
FastCdr & | serialize (const std::string &string_t)
| This function serializes a std::string.
FastCdr & | serialize (const std::wstring &string_t)
| This function serializes a std::wstring.
template<class _T, size_t _Size>
FastCdr & | serialize (const std::array< _T, _Size > &array_t)
| This function template serializes an array.
template<class _T = bool>
FastCdr & | serialize (const std::vector< bool > &vector_t)
| This function template serializes a sequence of booleans.
template<class _T>
FastCdr & | serialize (const std::vector< _T > &vector_t)
| This function template serializes a sequence.
template<class _T>
FastCdr & | serialize (const _T &type_t)
| This function template serializes a non-basic type.
FastCdr & | serialize_array (const uint8_t *octet_t, size_t num_elements)
| This function serializes an array of octets.
FastCdr & | serialize_array (const char *char_t, size_t num_elements)
| This function serializes an array of characters.
FastCdr & | serialize_array (const int8_t *int8, size_t num_elements)
| This function serializes an array of int8_t.
FastCdr & | serialize_array (const uint16_t *ushort_t, size_t num_elements)
| This function serializes an array of unsigned shorts.
FastCdr & | serialize_array (const int16_t *short_t, size_t num_elements)
| This function serializes an array of shorts.
FastCdr & | serialize_array (const uint32_t *ulong_t, size_t num_elements)
| This function serializes an array of unsigned longs.
FastCdr & | serialize_array (const int32_t *long_t, size_t num_elements)
| This function serializes an array of longs.
FastCdr & | serialize_array (const wchar_t *wchar, size_t num_elements)
| This function serializes an array of wide-chars.
FastCdr & | serialize_array (const uint64_t *ulonglong_t, size_t num_elements)
| This function serializes an array of unsigned long longs.
FastCdr & | serialize_array (const int64_t *longlong_t, size_t num_elements)
| This function serializes an array of long longs.
FastCdr & | serialize_array (const float *float_t, size_t num_elements)
| This function serializes an array of floats.
FastCdr & | serialize_array (const double *double_t, size_t num_elements)
| This function serializes an array of doubles.
FastCdr & | serialize_array (const long double *ldouble_t, size_t num_elements)
| This function serializes an array of long doubles.
FastCdr & | serialize_array (const bool *bool_t, size_t num_elements)
| This function serializes an array of booleans.
FastCdr & | serialize_array (const std::string *string_t, size_t num_elements)
| This function serializes an array of strings.
FastCdr & | serialize_array (const std::wstring *string_t, size_t num_elements)
| This function serializes an array of wstrings.
template<class _T>
FastCdr & | serialize_array (const std::vector< _T > *vector_t, size_t num_elements)
| This function template serializes an array of sequences.
template<class _T>
FastCdr & | serialize_array (const _T *type_t, size_t num_elements)
| This function template serializes an array of non-basic type objects.
template<class _T>
FastCdr & | serialize_sequence (const _T *sequence_t, size_t num_elements)
| This function template serializes a raw sequence.
FastCdr & | deserialize (uint8_t &octet_t)
| This function deserializes an octet.
FastCdr & | deserialize (char &char_t)
| This function deserializes a character.
FastCdr & | deserialize (int8_t &int8)
| This function deserializes an int8_t.
FastCdr & | deserialize (uint16_t &ushort_t)
| This function deserializes an unsigned short.
FastCdr & | deserialize (int16_t &short_t)
| This function deserializes a short.
FastCdr & | deserialize (uint32_t &ulong_t)
| This function deserializes an unsigned long.
FastCdr & | deserialize (int32_t &long_t)
| This function deserializes a long.
FastCdr & | deserialize (wchar_t &wchar)
| This function deserializes a wide-char.
FastCdr & | deserialize (uint64_t &ulonglong_t)
| This function deserializes an unsigned long long.
FastCdr & | deserialize (int64_t &longlong_t)
| This function deserializes a long long.
FastCdr & | deserialize (float &float_t)
| This function deserializes a float.
FastCdr & | deserialize (double &double_t)
| This function deserializes a double.
FastCdr & | deserialize (long double &ldouble_t)
| This function deserializes a long double.
FastCdr & | deserialize (bool &bool_t)
| This function deserializes a boolean.
FastCdr & | deserialize (char *&string_t)
| This function deserializes a string.
FastCdr & | deserialize (wchar_t *&string_t)
| This function deserializes a wide string.
FastCdr & | deserialize (std::string &string_t)
| This function deserializes a std::string.
FastCdr & | deserialize (std::wstring &string_t)
| This function deserializes a std::wstring.
template<class _T, size_t _Size>
FastCdr & | deserialize (std::array< _T, _Size > &array_t)
| This function template deserializes an array.
template<class _T = bool>
FastCdr & | deserialize (std::vector< bool > &vector_t)
| This function template deserializes a sequence of booleans.
template<class _T>
FastCdr & | deserialize (std::vector< _T > &vector_t)
| This function template deserializes a sequence.
template<class _T>
FastCdr & | deserialize (_T &type_t)
| This function template deserializes a non-basic type object.
FastCdr & | deserialize_array (uint8_t *octet_t, size_t num_elements)
| This function deserializes an array of octets.
FastCdr & | deserialize_array (char *char_t, size_t num_elements)
| This function deserializes an array of characters.
FastCdr & | deserialize_array (int8_t *int8, size_t num_elements)
| This function deserializes an array of int8_t.
FastCdr & | deserialize_array (uint16_t *ushort_t, size_t num_elements)
| This function deserializes an array of unsigned shorts.
FastCdr & | deserialize_array (int16_t *short_t, size_t num_elements)
| This function deserializes an array of shorts.
FastCdr & | deserialize_array (uint32_t *ulong_t, size_t num_elements)
| This function deserializes an array of unsigned longs.
FastCdr & | deserialize_array (int32_t *long_t, size_t num_elements)
| This function deserializes an array of longs.
FastCdr & | deserialize_array (wchar_t *wchar, size_t num_elements)
| This function deserializes an array of wide-chars.
FastCdr & | deserialize_array (uint64_t *ulonglong_t, size_t num_elements)
| This function deserializes an array of unsigned long longs.
FastCdr & | deserialize_array (int64_t *longlong_t, size_t num_elements)
| This function deserializes an array of long longs.
FastCdr & | deserialize_array (float *float_t, size_t num_elements)
| This function deserializes an array of floats.
FastCdr & | deserialize_array (double *double_t, size_t num_elements)
| This function deserializes an array of doubles.
FastCdr & | deserialize_array (long double *ldouble_t, size_t num_elements)
| This function deserializes an array of long doubles.
FastCdr & | deserialize_array (bool *bool_t, size_t num_elements)
| This function deserializes an array of booleans.
FastCdr & | deserialize_array (std::string *string_t, size_t num_elements)
| This function deserializes an array of strings.
FastCdr & | deserialize_array (std::wstring *string_t, size_t num_elements)
| This function deserializes an array of wide-strings.
template<class _T>
FastCdr & | deserialize_array (std::vector< _T > *vector_t, size_t num_elements)
| This function template deserializes an array of sequences.
template<class _T>
FastCdr & | deserialize_array (_T *type_t, size_t num_elements)
| This function template deserializes an array of non-basic type objects.
template<class _T = std::string>
FastCdr & | deserialize_sequence (std::string *&sequence_t, size_t &num_elements)
| This function template deserializes a string sequence.
template<class _T = std::wstring>
FastCdr & | deserialize_sequence (std::wstring *&sequence_t, size_t &num_elements)
| This function template deserializes a wide-string sequence.
template<class _T>
FastCdr & | deserialize_sequence (_T *&sequence_t, size_t &num_elements)
| This function template deserializes a raw sequence.

## Detailed Description

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

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

## Constructor & Destructor Documentation

## ◆ FastCdr()

FastCdr | ( | FastBuffer & | cdr_buffer | ) |

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

Parameters

  cdr_buffer | A reference to the buffer that contains (or will contain) the CDR representation.

## Member Function Documentation

## ◆ deserialize() [1/22]

template<class _T>

FastCdr & deserialize | ( | _T & | type_t | ) |

inline

This function template deserializes a non-basic type object.

Parameters

  type_t | The variable that will store the object read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [2/22]

FastCdr & deserialize | ( | bool & | bool_t | ) |

This function deserializes a boolean.

Parameters

  bool_t | The variable that will store the boolean read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
  exception::BadParamException | This exception is thrown when trying to deserialize in an invalid value.

## ◆ deserialize() [3/22]

FastCdr & deserialize | ( | char & | char_t | ) |

inline

This function deserializes a character.

Parameters

  char_t | The variable that will store the character read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [4/22]

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_t | The 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::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [5/22]

FastCdr & deserialize | ( | double & | double_t | ) |

inline

This function deserializes a double.

Parameters

  double_t | The variable that will store the double read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [6/22]

FastCdr & deserialize | ( | float & | float_t | ) |

inline

This function deserializes a float.

Parameters

  float_t | The variable that will store the float read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [7/22]

FastCdr & deserialize | ( | int16_t & | short_t | ) |

inline

This function deserializes a short.

Parameters

  short_t | The variable that will store the short read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [8/22]

FastCdr & deserialize | ( | int32_t & | long_t | ) |

inline

This function deserializes a long.

Parameters

  long_t | The variable that will store the long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [9/22]

FastCdr & deserialize | ( | int64_t & | longlong_t | ) |

inline

This function deserializes a long long.

Parameters

  longlong_t | The variable that will store the long long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [10/22]

FastCdr & deserialize | ( | int8_t & | int8 | ) |

inline

This function deserializes an int8_t.

Parameters

  int8 | The variable that will store the int8_t read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [11/22]

FastCdr & deserialize | ( | long double & | ldouble_t | ) |

inline

This function deserializes a long double.

Parameters

  ldouble_t | The variable that will store the long double read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [12/22]

template<class _T, size_t _Size>

FastCdr & deserialize | ( | std::array< _T, _Size > & | array_t | ) |

inline

This function template deserializes an array.

Parameters

  array_t | The variable that will store the array read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [13/22]

FastCdr & deserialize | ( | std::string & | string_t | ) |

inline

This function deserializes a std::string.

Parameters

  string_t | The variable that will store the string read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [14/22]

template<class _T>

FastCdr & deserialize | ( | std::vector< _T > & | vector_t | ) |

inline

This function template deserializes a sequence.

Parameters

  vector_t | The variable that will store the sequence read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [15/22]

template<class _T = bool>

FastCdr & deserialize | ( | std::vector< bool > & | vector_t | ) |

inline

This function template deserializes a sequence of booleans.

Parameters

  vector_t | The variable that will store the sequence read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [16/22]

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

inline

This function deserializes a std::wstring.

Parameters

  string_t | The variable that will store the wstring read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [17/22]

FastCdr & deserialize | ( | uint16_t & | ushort_t | ) |

inline

This function deserializes an unsigned short.

Parameters

  ushort_t | The variable that will store the unsigned short read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [18/22]

FastCdr & deserialize | ( | uint32_t & | ulong_t | ) |

inline

This function deserializes an unsigned long.

Parameters

  ulong_t | The variable that will store the unsigned long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [19/22]

FastCdr & deserialize | ( | uint64_t & | ulonglong_t | ) |

inline

This function deserializes an unsigned long long.

Parameters

  ulonglong_t | The variable that will store the unsigned long long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [20/22]

FastCdr & deserialize | ( | uint8_t & | octet_t | ) |

inline

This function deserializes an octet.

Parameters

  octet_t | The variable that will store the octet read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [21/22]

FastCdr & deserialize | ( | wchar_t & | wchar | ) |

inline

This function deserializes a wide-char.

Parameters

  wchar | The variable that will store the wide-char read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize() [22/22]

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_t | The 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::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [1/18]

template<class _T>

FastCdr & deserialize_array | ( | _T * | type_t,
|  | size_t | num_elements )

inline

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

Parameters

  type_t | The variable that will store the array of objects read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [2/18]

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

This function deserializes an array of booleans.

Parameters

  bool_t | The variable that will store the array of booleans read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [3/18]

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

This function deserializes an array of characters.

Parameters

  char_t | The variable that will store the array of characters read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [4/18]

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

This function deserializes an array of doubles.

Parameters

  double_t | The variable that will store the array of doubles read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [5/18]

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

This function deserializes an array of floats.

Parameters

  float_t | The variable that will store the array of floats read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [6/18]

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

This function deserializes an array of shorts.

Parameters

  short_t | The variable that will store the array of shorts read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [7/18]

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

This function deserializes an array of longs.

Parameters

  long_t | The variable that will store the array of longs read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [8/18]

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

This function deserializes an array of long longs.

Parameters

  longlong_t | The variable that will store the array of long longs read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [9/18]

FastCdr & deserialize_array | ( | int8_t * | int8,
|  | size_t | num_elements )

inline

This function deserializes an array of int8_t.

Parameters

  int8 | The variable that will store the array of int8_t read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [10/18]

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

This function deserializes an array of long doubles.

Parameters

  ldouble_t | The variable that will store the array of long doubles read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [11/18]

FastCdr & deserialize_array | ( | std::string * | string_t,
|  | size_t | num_elements )

inline

This function deserializes an array of strings.

Parameters

  string_t | The variable that will store the array of strings read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [12/18]

template<class _T>

FastCdr & deserialize_array | ( | std::vector< _T > * | vector_t,
|  | size_t | num_elements )

inline

This function template deserializes an array of sequences.

Parameters

  vector_t | The variable that will store the array of sequences read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [13/18]

FastCdr & deserialize_array | ( | std::wstring * | string_t,
|  | size_t | num_elements )

inline

This function deserializes an array of wide-strings.

Parameters

  string_t | The variable that will store the array of strings read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [14/18]

FastCdr & deserialize_array | ( | uint16_t * | ushort_t,
|  | size_t | num_elements )

inline

This function deserializes an array of unsigned shorts.

Parameters

  ushort_t | The variable that will store the array of unsigned shorts read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [15/18]

FastCdr & deserialize_array | ( | uint32_t * | ulong_t,
|  | size_t | num_elements )

inline

This function deserializes an array of unsigned longs.

Parameters

  ulong_t | The variable that will store the array of unsigned longs read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [16/18]

FastCdr & deserialize_array | ( | uint64_t * | ulonglong_t,
|  | size_t | num_elements )

inline

This function deserializes an array of unsigned long longs.

Parameters

  ulonglong_t | The variable that will store the array of unsigned long longs read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [17/18]

FastCdr & deserialize_array | ( | uint8_t * | octet_t,
|  | size_t | num_elements )

inline

This function deserializes an array of octets.

Parameters

  octet_t | The variable that will store the array of octets read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_array() [18/18]

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

This function deserializes an array of wide-chars.

Parameters

  wchar | The variable that will store the array of wide-chars read from the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_sequence() [1/3]

template<class _T>

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_t | The pointer that will store the sequence read from the buffer.
  num_elements | This variable return the number of elements of the sequence.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_sequence() [2/3]

template<class _T = std::string>

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_t | The pointer that will store the sequence read from the buffer.
  num_elements | This variable return the number of elements of the sequence.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ deserialize_sequence() [3/3]

template<class _T = std::wstring>

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_t | The pointer that will store the sequence read from the buffer.
  num_elements | This variable return the number of elements of the sequence.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ get_current_position()

char * get_current_position | ( |  | ) |

This function returns the current position in the CDR stream.

Returns
  Pointer to the current position in the buffer.

## ◆ get_serialized_data_length()

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

## ◆ get_state()

FastCdr::state get_state | ( |  | ) |

This function returns the current state of the CDR stream.

Returns
  The current state of the buffer.

## ◆ jump()

bool jump | ( | size_t | num_bytes | ) |

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

Parameters

  num_bytes | The number of bytes that will be jumped.

Returns
  True is returned when the jump operation works successfully. Otherwise, false is returned.

## ◆ operator<<() [1/21]

template<class _T>

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

inline

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

Parameters

  type_t | The object that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [2/21]

FastCdr & operator<< | ( | const bool | bool_t | ) |

inline

This operator serializes a boolean.

Parameters

  bool_t | The value of the boolean that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [3/21]

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

inline

This operator serializes a null-terminated string.

Parameters

  string_t | The value of the string that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [4/21]

FastCdr & operator<< | ( | const char | char_t | ) |

inline

This operator serializes a character.

Parameters

  char_t | The value of the character that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [5/21]

FastCdr & operator<< | ( | const double | double_t | ) |

inline

This operator serializes a ldouble.

Parameters

  double_t | The value of the double that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [6/21]

FastCdr & operator<< | ( | const float | float_t | ) |

inline

This operator serializes a float.

Parameters

  float_t | The value of the float that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [7/21]

FastCdr & operator<< | ( | const int16_t | short_t | ) |

inline

This operator serializes a short.

Parameters

  short_t | The value of the short that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [8/21]

FastCdr & operator<< | ( | const int32_t | long_t | ) |

inline

This operator serializes a long.

Parameters

  long_t | The value of the long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [9/21]

FastCdr & operator<< | ( | const int64_t | longlong_t | ) |

inline

This operator serializes a long long.

Parameters

  longlong_t | The value of the long long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [10/21]

FastCdr & operator<< | ( | const int8_t | int8 | ) |

inline

This operator serializes a int8_t.

Parameters

  int8 | The value of the int8_t that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [11/21]

FastCdr & operator<< | ( | const long double | ldouble_t | ) |

inline

This operator serializes a long double.

Parameters

  ldouble_t | The value of the long double that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [12/21]

template<class _T, size_t _Size>

FastCdr & operator<< | ( | const std::array< _T, _Size > & | array_t | ) |

inline

This operator template is used to serialize arrays.

Parameters

  array_t | The array that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [13/21]

FastCdr & operator<< | ( | const std::string & | string_t | ) |

inline

This operator serializes a string.

Parameters

  string_t | The string that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [14/21]

template<class _T>

FastCdr & operator<< | ( | const std::vector< _T > & | vector_t | ) |

inline

This operator template is used to serialize sequences.

Parameters

  vector_t | The sequence that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [15/21]

FastCdr & operator<< | ( | const std::wstring & | string_t | ) |

inline

This operator serializes a wstring.

Parameters

  string_t | The wstring that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [16/21]

FastCdr & operator<< | ( | const uint16_t | ushort_t | ) |

inline

This operator serializes an unsigned short.

Parameters

  ushort_t | The value of the unsigned short that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [17/21]

FastCdr & operator<< | ( | const uint32_t | ulong_t | ) |

inline

This operator serializes an unsigned long.

Parameters

  ulong_t | The value of the unsigned long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [18/21]

FastCdr & operator<< | ( | const uint64_t | ulonglong_t | ) |

inline

This operator serializes an unsigned long long.

Parameters

  ulonglong_t | The value of the unsigned long long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [19/21]

FastCdr & operator<< | ( | const uint8_t | octet_t | ) |

inline

This operator serializes an octet.

Parameters

  octet_t | The value of the octet that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [20/21]

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

inline

This operator serializes a null-terminated wide-string.

Parameters

  string_t | The value of the wide-string that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator<<() [21/21]

FastCdr & operator<< | ( | const wchar_t | wchar | ) |

inline

This operator serializes a wide-char.

Parameters

  wchar | The value of the wide-char that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ operator>>() [1/20]

template<class _T>

FastCdr & operator>> | ( | _T & | type_t | ) |

inline

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

Parameters

  type_t | The variable that will store the object read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [2/20]

FastCdr & operator>> | ( | bool & | bool_t | ) |

inline

This operator deserializes a boolean.

Parameters

  bool_t | The variable that will store the boolean read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
  exception::BadParamException | This exception is thrown when trying to deserialize in an invalid value.

## ◆ operator>>() [3/20]

FastCdr & operator>> | ( | char & | char_t | ) |

inline

This operator deserializes a character.

Parameters

  char_t | The variable that will store the character read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [4/20]

FastCdr & operator>> | ( | char *& | string_t | ) |

inline

This operator deserializes a null-terminated c-string.

Parameters

  string_t | The 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::NotEnoughMemoryException | This exception is thrown when trying to deserialize a position that exceeds the internal memory size.
  exception::BadParamException | This exception is thrown when trying to deserialize an invalid value.

## ◆ operator>>() [5/20]

FastCdr & operator>> | ( | double & | double_t | ) |

inline

This operator deserializes a double.

Parameters

  double_t | The variable that will store the double read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [6/20]

FastCdr & operator>> | ( | float & | float_t | ) |

inline

This operator deserializes a float.

Parameters

  float_t | The variable that will store the float read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [7/20]

FastCdr & operator>> | ( | int16_t & | short_t | ) |

inline

This operator deserializes a short.

Parameters

  short_t | The variable that will store the short read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [8/20]

FastCdr & operator>> | ( | int32_t & | long_t | ) |

inline

This operator deserializes a long.

Parameters

  long_t | The variable that will store the long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [9/20]

FastCdr & operator>> | ( | int64_t & | longlong_t | ) |

inline

This operator deserializes a long long.

Parameters

  longlong_t | The variable that will store the long long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [10/20]

FastCdr & operator>> | ( | int8_t & | int8 | ) |

inline

This operator deserializes an int8_t.

Parameters

  int8 | The variable that will store the int8_t read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [11/20]

FastCdr & operator>> | ( | long double & | ldouble_t | ) |

inline

This operator deserializes a long double.

Parameters

  ldouble_t | The variable that will store the long double read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [12/20]

template<class _T, size_t _Size>

FastCdr & operator>> | ( | std::array< _T, _Size > & | array_t | ) |

inline

This operator template is used to deserialize arrays.

Parameters

  array_t | The variable that will store the array read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [13/20]

FastCdr & operator>> | ( | std::string & | string_t | ) |

inline

This operator deserializes a string.

Parameters

  string_t | The variable that will store the string read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [14/20]

template<class _T>

FastCdr & operator>> | ( | std::vector< _T > & | vector_t | ) |

inline

This operator template is used to deserialize sequences.

Parameters

  vector_t | The variable that will store the sequence read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [15/20]

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

inline

This operator deserializes a wstring.

Parameters

  string_t | The variable that will store the wstring read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [16/20]

FastCdr & operator>> | ( | uint16_t & | ushort_t | ) |

inline

This operator deserializes an unsigned short.

Parameters

  ushort_t | The variable that will store the unsigned short read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [17/20]

FastCdr & operator>> | ( | uint32_t & | ulong_t | ) |

inline

This operator deserializes an unsigned long.

Parameters

  ulong_t | The variable that will store the unsigned long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [18/20]

FastCdr & operator>> | ( | uint64_t & | ulonglong_t | ) |

inline

This operator deserializes an unsigned long long.

Parameters

  ulonglong_t | The variable that will store the unsigned long long read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [19/20]

FastCdr & operator>> | ( | uint8_t & | octet_t | ) |

inline

This operator deserializes an octet.

Parameters

  octet_t | The variable that will store the octet read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ operator>>() [20/20]

FastCdr & operator>> | ( | wchar_t & | wchar | ) |

inline

This operator deserializes a wide-char.

Parameters

  wchar | The variable that will store the wide-char read from the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.

## ◆ reset()

void reset | ( |  | ) |

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

## ◆ serialize() [1/22]

template<class _T>

FastCdr & serialize | ( | const _T & | type_t | ) |

inline

This function template serializes a non-basic type.

Parameters

  type_t | The object that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [2/22]

FastCdr & serialize | ( | const bool | bool_t | ) |

This function serializes a boolean.

Parameters

  bool_t | The value of the boolean that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [3/22]

FastCdr & serialize | ( | const char * | string_t | ) |

This function serializes a string.

Parameters

  string_t | The pointer to the string that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [4/22]

FastCdr & serialize | ( | const char | char_t | ) |

inline

This function serializes a character.

Parameters

  char_t | The value of the character that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [5/22]

FastCdr & serialize | ( | const double | double_t | ) |

inline

This function serializes a double.

Parameters

  double_t | The value of the double that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [6/22]

FastCdr & serialize | ( | const float | float_t | ) |

inline

This function serializes a float.

Parameters

  float_t | The value of the float that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [7/22]

FastCdr & serialize | ( | const int16_t | short_t | ) |

inline

This function serializes a short.

Parameters

  short_t | The value of the short that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [8/22]

FastCdr & serialize | ( | const int32_t | long_t | ) |

inline

This function serializes a long.

Parameters

  long_t | The value of the long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [9/22]

FastCdr & serialize | ( | const int64_t | longlong_t | ) |

inline

This function serializes a long long.

Parameters

  longlong_t | The value of the long long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [10/22]

FastCdr & serialize | ( | const int8_t | int8 | ) |

inline

This function serializes an int8_t.

Parameters

  int8 | The value of the int8_t that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [11/22]

FastCdr & serialize | ( | const long double | ldouble_t | ) |

inline

This function serializes a long double.

Parameters

  ldouble_t | The value of the long double that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [12/22]

template<class _T, size_t _Size>

FastCdr & serialize | ( | const std::array< _T, _Size > & | array_t | ) |

inline

This function template serializes an array.

Parameters

  array_t | The array that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [13/22]

FastCdr & serialize | ( | const std::string & | string_t | ) |

inline

This function serializes a std::string.

Parameters

  string_t | The string that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
  exception::BadParamException | This exception is thrown when trying to serialize a string with null characters.

## ◆ serialize() [14/22]

template<class _T>

FastCdr & serialize | ( | const std::vector< _T > & | vector_t | ) |

inline

This function template serializes a sequence.

Parameters

  vector_t | The sequence that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [15/22]

template<class _T = bool>

FastCdr & serialize | ( | const std::vector< bool > & | vector_t | ) |

inline

This function template serializes a sequence of booleans.

Parameters

  vector_t | The sequence that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [16/22]

FastCdr & serialize | ( | const std::wstring & | string_t | ) |

inline

This function serializes a std::wstring.

Parameters

  string_t | The wstring that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [17/22]

FastCdr & serialize | ( | const uint16_t | ushort_t | ) |

inline

This function serializes an unsigned short.

Parameters

  ushort_t | The value of the unsigned short that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [18/22]

FastCdr & serialize | ( | const uint32_t | ulong_t | ) |

inline

This function serializes an unsigned long.

Parameters

  ulong_t | The value of the unsigned long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [19/22]

FastCdr & serialize | ( | const uint64_t | ulonglong_t | ) |

inline

This function serializes an unsigned long long.

Parameters

  ulonglong_t | The value of the unsigned long long that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [20/22]

FastCdr & serialize | ( | const uint8_t | octet_t | ) |

inline

This function serializes an octet.

Parameters

  octet_t | The value of the octet that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [21/22]

FastCdr & serialize | ( | const wchar_t * | string_t | ) |

This function serializes a wstring.

Parameters

  string_t | The pointer to the wstring that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize() [22/22]

FastCdr & serialize | ( | const wchar_t | wchar | ) |

inline

This function serializes a wide-char.

Parameters

  wchar | The value of the wide-char that will be serialized in the buffer.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [1/18]

template<class _T>

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_t | The array of objects that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [2/18]

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

This function serializes an array of booleans.

Parameters

  bool_t | The array of booleans that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [3/18]

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

This function serializes an array of characters.

Parameters

  char_t | The array of characters that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [4/18]

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

This function serializes an array of doubles.

Parameters

  double_t | The array of doubles that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [5/18]

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

This function serializes an array of floats.

Parameters

  float_t | The array of floats that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [6/18]

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

This function serializes an array of shorts.

Parameters

  short_t | The array of shorts that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [7/18]

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

This function serializes an array of longs.

Parameters

  long_t | The array of longs that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [8/18]

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

This function serializes an array of long longs.

Parameters

  longlong_t | The array of long longs that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [9/18]

FastCdr & serialize_array | ( | const int8_t * | int8,
|  | size_t | num_elements )

inline

This function serializes an array of int8_t.

Parameters

  int8 | The sequence of int8_t that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [10/18]

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

This function serializes an array of long doubles.

Parameters

  ldouble_t | The array of long doubles that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [11/18]

FastCdr & serialize_array | ( | const std::string * | string_t,
|  | size_t | num_elements )

inline

This function serializes an array of strings.

Parameters

  string_t | The array of strings that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [12/18]

template<class _T>

FastCdr & serialize_array | ( | const std::vector< _T > * | vector_t,
|  | size_t | num_elements )

inline

This function template serializes an array of sequences.

Parameters

  vector_t | The array of sequences that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [13/18]

FastCdr & serialize_array | ( | const std::wstring * | string_t,
|  | size_t | num_elements )

inline

This function serializes an array of wstrings.

Parameters

  string_t | The array of wstrings that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [14/18]

FastCdr & serialize_array | ( | const uint16_t * | ushort_t,
|  | size_t | num_elements )

inline

This function serializes an array of unsigned shorts.

Parameters

  ushort_t | The array of unsigned shorts that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [15/18]

FastCdr & serialize_array | ( | const uint32_t * | ulong_t,
|  | size_t | num_elements )

inline

This function serializes an array of unsigned longs.

Parameters

  ulong_t | The array of unsigned longs that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [16/18]

FastCdr & serialize_array | ( | const uint64_t * | ulonglong_t,
|  | size_t | num_elements )

inline

This function serializes an array of unsigned long longs.

Parameters

  ulonglong_t | The array of unsigned long longs that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [17/18]

FastCdr & serialize_array | ( | const uint8_t * | octet_t,
|  | size_t | num_elements )

inline

This function serializes an array of octets.

Parameters

  octet_t | The sequence of octets that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_array() [18/18]

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

This function serializes an array of wide-chars.

Parameters

  wchar | The array of wide-chars that will be serialized in the buffer.
  num_elements | Number of the elements in the array.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ serialize_sequence()

template<class _T>

FastCdr & serialize_sequence | ( | const _T * | sequence_t,
|  | size_t | num_elements )

inline

This function template serializes a raw sequence.

Parameters

  sequence_t | Pointer to the sequence that will be serialized in the buffer.
  num_elements | The number of elements contained in the sequence.

Returns
  Reference to the eprosima::fastcdr::FastCdr object.

Exceptions

  exception::NotEnoughMemoryException | This exception is thrown when trying to serialize in a position that exceeds the internal memory size.

## ◆ set_state()

void set_state | ( | FastCdr::state & | state | ) |

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

Parameters

  state | Previous state that will be set again.

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

- include/fastcdr/FastCdr.h