Class FastCdr
Defined in File FastCdr.h
Nested Relationships
Nested Types
Class Documentation
-
class FastCdr
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.
Public Functions
-
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.
-
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.
-
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.
- Returns:
Pointer to the current position in the buffer.
-
inline size_t get_serialized_data_length() const
This function returns the length of the serialized data inside the stream.
- Returns:
The length of the serialized data.
-
FastCdr::state get_state()
This function returns the current state of the CDR stream.
- Returns:
The current state of the buffer.
-
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.
-
inline FastCdr &operator<<(const uint8_t octet_t)
This operator serializes an octet.
- Parameters:
octet_t – The value of the octet that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const char char_t)
This operator serializes a character.
- Parameters:
char_t – The value of the character that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const int8_t int8)
This operator serializes a int8_t.
- Parameters:
int8 – The value of the int8_t that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const uint16_t ushort_t)
This operator serializes an unsigned short.
- Parameters:
ushort_t – The value of the unsigned short that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const int16_t short_t)
This operator serializes a short.
- Parameters:
short_t – The value of the short that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const uint32_t ulong_t)
This operator serializes an unsigned long.
- Parameters:
ulong_t – The value of the unsigned long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const int32_t long_t)
This operator serializes a long.
- Parameters:
long_t – The value of the long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const wchar_t wchar)
This operator serializes a wide-char.
- Parameters:
wchar – The value of the wide-char that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const uint64_t ulonglong_t)
This operator serializes an unsigned long long.
- Parameters:
ulonglong_t – The value of the unsigned long long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const int64_t longlong_t)
This operator serializes a long long.
- Parameters:
longlong_t – The value of the long long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const float float_t)
This operator serializes a float.
- Parameters:
float_t – The value of the float that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const double double_t)
This operator serializes a ldouble.
- Parameters:
double_t – The value of the double that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const long double ldouble_t)
This operator serializes a long double.
- Parameters:
ldouble_t – The value of the long double that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const bool bool_t)
This operator serializes a boolean.
- Parameters:
bool_t – The value of the boolean that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const char *string_t)
This operator serializes a null-terminated string.
- Parameters:
string_t – The value of the string that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const wchar_t *string_t)
This operator serializes a null-terminated wide-string.
- Parameters:
string_t – The value of the wide-string that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const std::string &string_t)
This operator serializes a string.
- Parameters:
string_t – The string that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator<<(const std::wstring &string_t)
This operator serializes a wstring.
- Parameters:
string_t – The wstring that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T, size_t _Size>
inline FastCdr &operator<<(const std::array<_T, _Size> &array_t) This operator template is used to serialize arrays.
- Parameters:
array_t – The array that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &operator<<(const std::vector<_T> &vector_t) This operator template is used to serialize sequences.
- Parameters:
vector_t – The sequence that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &operator<<(const _T &type_t) This operator template is used to serialize non-basic types.
- Parameters:
type_t – The object that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(uint8_t &octet_t)
This operator deserializes an octet.
- Parameters:
octet_t – The variable that will store the octet read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(char &char_t)
This operator deserializes a character.
- Parameters:
char_t – The variable that will store the character read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(int8_t &int8)
This operator deserializes an int8_t.
- Parameters:
int8 – The variable that will store the int8_t read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(uint16_t &ushort_t)
This operator deserializes an unsigned short.
- Parameters:
ushort_t – The variable that will store the unsigned short read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(int16_t &short_t)
This operator deserializes a short.
- Parameters:
short_t – The variable that will store the short read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(uint32_t &ulong_t)
This operator deserializes an unsigned long.
- Parameters:
ulong_t – The variable that will store the unsigned long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(int32_t &long_t)
This operator deserializes a long.
- Parameters:
long_t – The variable that will store the long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(wchar_t &wchar)
This operator deserializes a wide-char.
- Parameters:
wchar – The variable that will store the wide-char read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(uint64_t &ulonglong_t)
This operator deserializes an unsigned long long.
- Parameters:
ulonglong_t – The variable that will store the unsigned long long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(int64_t &longlong_t)
This operator deserializes a long long.
- Parameters:
longlong_t – The variable that will store the long long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(float &float_t)
This operator deserializes a float.
- Parameters:
float_t – The variable that will store the float read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(double &double_t)
This operator deserializes a double.
- Parameters:
double_t – The variable that will store the double read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(long double &ldouble_t)
This operator deserializes a long double.
- Parameters:
ldouble_t – The variable that will store the long double read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(bool &bool_t)
This operator deserializes a boolean.
- Parameters:
bool_t – The variable that will store the boolean read from the buffer.
- Throws:
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.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(char *&string_t)
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.
- Throws:
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.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(std::string &string_t)
This operator deserializes a string.
- Parameters:
string_t – The variable that will store the string read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &operator>>(std::wstring &string_t)
This operator deserializes a wstring.
- Parameters:
string_t – The variable that will store the wstring read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T, size_t _Size>
inline FastCdr &operator>>(std::array<_T, _Size> &array_t) This operator template is used to deserialize arrays.
- Parameters:
array_t – The variable that will store the array read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &operator>>(std::vector<_T> &vector_t) This operator template is used to deserialize sequences.
- Parameters:
vector_t – The variable that will store the sequence read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &operator>>(_T &type_t) This operator template is used to deserialize non-basic types.
- Parameters:
type_t – The variable that will store the object read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const uint8_t octet_t)
This function serializes an octet.
- Parameters:
octet_t – The value of the octet that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const char char_t)
This function serializes a character.
- Parameters:
char_t – The value of the character that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const int8_t int8)
This function serializes an int8_t.
- Parameters:
int8 – The value of the int8_t that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const uint16_t ushort_t)
This function serializes an unsigned short.
- Parameters:
ushort_t – The value of the unsigned short that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const int16_t short_t)
This function serializes a short.
- Parameters:
short_t – The value of the short that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const uint32_t ulong_t)
This function serializes an unsigned long.
- Parameters:
ulong_t – The value of the unsigned long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const int32_t long_t)
This function serializes a long.
- Parameters:
long_t – The value of the long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const wchar_t wchar)
This function serializes a wide-char.
- Parameters:
wchar – The value of the wide-char that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const uint64_t ulonglong_t)
This function serializes an unsigned long long.
- Parameters:
ulonglong_t – The value of the unsigned long long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const int64_t longlong_t)
This function serializes a long long.
- Parameters:
longlong_t – The value of the long long that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const float float_t)
This function serializes a float.
- Parameters:
float_t – The value of the float that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const double double_t)
This function serializes a double.
- Parameters:
double_t – The value of the double that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const long double ldouble_t)
This function serializes a long double.
- Parameters:
ldouble_t – The value of the long double that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const std::string &string_t)
This function serializes a std::string.
- Parameters:
string_t – The string that will be serialized in the buffer.
- Throws:
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.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize(const std::wstring &string_t)
This function serializes a std::wstring.
- Parameters:
string_t – The wstring that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T, size_t _Size>
inline FastCdr &serialize(const std::array<_T, _Size> &array_t) This function template serializes an array.
- Parameters:
array_t – The array that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T = bool>
inline FastCdr &serialize(const std::vector<bool> &vector_t) This function template serializes a sequence of booleans.
- Parameters:
vector_t – The sequence that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &serialize(const std::vector<_T> &vector_t) This function template serializes a sequence.
- Parameters:
vector_t – The sequence that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &serialize(const _T &type_t) This function template serializes a non-basic type.
- Parameters:
type_t – The object that will be serialized in the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize_array(const uint8_t *octet_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize_array(const int8_t *int8, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize_array(const uint16_t *ushort_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize_array(const uint32_t *ulong_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize_array(const uint64_t *ulonglong_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize_array(const std::string *string_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &serialize_array(const std::wstring *string_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &serialize_array(const std::vector<_T> *vector_t, size_t num_elements) 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &serialize_array(const _T *type_t, size_t num_elements) 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &serialize_sequence(const _T *sequence_t, size_t num_elements) 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to serialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(uint8_t &octet_t)
This function deserializes an octet.
- Parameters:
octet_t – The variable that will store the octet read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(char &char_t)
This function deserializes a character.
- Parameters:
char_t – The variable that will store the character read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(int8_t &int8)
This function deserializes an int8_t.
- Parameters:
int8 – The variable that will store the int8_t read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(uint16_t &ushort_t)
This function deserializes an unsigned short.
- Parameters:
ushort_t – The variable that will store the unsigned short read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(int16_t &short_t)
This function deserializes a short.
- Parameters:
short_t – The variable that will store the short read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(uint32_t &ulong_t)
This function deserializes an unsigned long.
- Parameters:
ulong_t – The variable that will store the unsigned long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(int32_t &long_t)
This function deserializes a long.
- Parameters:
long_t – The variable that will store the long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(wchar_t &wchar)
This function deserializes a wide-char.
- Parameters:
wchar – The variable that will store the wide-char read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(uint64_t &ulonglong_t)
This function deserializes an unsigned long long.
- Parameters:
ulonglong_t – The variable that will store the unsigned long long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(int64_t &longlong_t)
This function deserializes a long long.
- Parameters:
longlong_t – The variable that will store the long long read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(float &float_t)
This function deserializes a float.
- Parameters:
float_t – The variable that will store the float read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(double &double_t)
This function deserializes a double.
- Parameters:
double_t – The variable that will store the double read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(long double &ldouble_t)
This function deserializes a long double.
- Parameters:
ldouble_t – The variable that will store the long double read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
FastCdr &deserialize(bool &bool_t)
This function deserializes a boolean.
- Parameters:
bool_t – The variable that will store the boolean read from the buffer.
- Throws:
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.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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()
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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()
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(std::string &string_t)
This function deserializes a std::string.
- Parameters:
string_t – The variable that will store the string read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize(std::wstring &string_t)
This function deserializes a std::wstring.
- Parameters:
string_t – The variable that will store the wstring read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T, size_t _Size>
inline FastCdr &deserialize(std::array<_T, _Size> &array_t) This function template deserializes an array.
- Parameters:
array_t – The variable that will store the array read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T = bool>
inline FastCdr &deserialize(std::vector<bool> &vector_t) This function template deserializes a sequence of booleans.
- Parameters:
vector_t – The variable that will store the sequence read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &deserialize(std::vector<_T> &vector_t) This function template deserializes a sequence.
- Parameters:
vector_t – The variable that will store the sequence read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &deserialize(_T &type_t) This function template deserializes a non-basic type object.
- Parameters:
type_t – The variable that will store the object read from the buffer.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize_array(uint8_t *octet_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize_array(int8_t *int8, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize_array(uint16_t *ushort_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize_array(uint32_t *ulong_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize_array(uint64_t *ulonglong_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize_array(std::string *string_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
inline FastCdr &deserialize_array(std::wstring *string_t, size_t num_elements)
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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &deserialize_array(std::vector<_T> *vector_t, size_t num_elements) 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &deserialize_array(_T *type_t, size_t num_elements) 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T = std::string>
inline FastCdr &deserialize_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()
- 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T = std::wstring>
inline FastCdr &deserialize_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()
- 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
template<class _T>
inline FastCdr &deserialize_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()
- 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.
- Throws:
exception::NotEnoughMemoryException – This exception is thrown when trying to deserialize in a position that exceeds the internal memory size.
- Returns:
Reference to the eprosima::fastcdr::FastCdr object.
-
class state
This class stores the current state of a CDR serialization.
-
FastCdr(FastBuffer &cdr_buffer)