Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
eprosima::fastcdr::CdrSizeCalculator Class Reference

This class offers an interface to calculate the encoded size of a type serialized using a support encoding algorithm. More...

#include <CdrSizeCalculator.hpp>

Public Member Functions

Cdr_DllAPI size_t begin_calculate_type_serialized_size (EncodingAlgorithmFlag new_encoding, size_t &current_alignment)
 Indicates a new constructed type will be calculated. More...
 
template<class _T >
size_t calculate_array_serialized_size (const _T *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of unknown type. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const char *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of char. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const double *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of double. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const float *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of float. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const int16_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of int16_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const int32_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of int32_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const int64_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of int64_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const int8_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of int8_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const long double *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of long double. More...
 
template<class _T , size_t _N>
size_t calculate_array_serialized_size (const std::array< _T, _N > *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a multi-dimensional array. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value||std::is_arithmetic< _T >::value >::type * = nullptr>
size_t calculate_array_serialized_size (const std::vector< _T > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an std::vector of primitives as an array. More...
 
template<class _T , typename std::enable_if<!std::is_enum< _T >::value &&!std::is_arithmetic< _T >::value >::type * = nullptr>
size_t calculate_array_serialized_size (const std::vector< _T > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an std::vector of non-primitives as an array. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const std::vector< bool > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an std::vector of bool as an array. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const uint16_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of uint16_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const uint32_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of uint32_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const uint64_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of uint64_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const uint8_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of uint8_t. More...
 
TEMPLATE_SPEC size_t calculate_array_serialized_size (const wchar_t *data, size_t num_elements, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array of wchar. More...
 
template<class _T >
size_t calculate_member_serialized_size (const MemberId &id, const _T &data, size_t &current_alignment)
 Generic template which calculates the encoded size of the constructed type's member of a unknown type. More...
 
template<class _T >
size_t calculate_member_serialized_size (const MemberId &id, const optional< _T > &data, size_t &current_alignment)
 Generic template which calculates the encoded size of the constructed type's member of type optional. More...
 
template<class _T , typename std::enable_if<!std::is_enum< _T >::value >::type * = nullptr, typename = void>
size_t calculate_serialized_size (const _T &data, size_t &current_alignment)
 Generic template which calculates the encoded size of an instance of an unknown type. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, int32_t >::value >::type * = nullptr>
size_t calculate_serialized_size (const _T &data, size_t &current_alignment)
 Template which calculates the encoded size of an instance of an enumeration of 32bits. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, uint32_t >::value >::type * = nullptr>
size_t calculate_serialized_size (const _T &data, size_t &current_alignment)
 Template which calculates the encoded size of an instance of an enumeration of unsigned 32bits. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, int16_t >::value >::type * = nullptr>
size_t calculate_serialized_size (const _T &data, size_t &current_alignment)
 Template which calculates the encoded size of an instance of an enumeration of 16bits. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, uint16_t >::value >::type * = nullptr>
size_t calculate_serialized_size (const _T &data, size_t &current_alignment)
 Template which calculates the encoded size of an instance of an enumeration of unsigned 16bits. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, int8_t >::value >::type * = nullptr>
size_t calculate_serialized_size (const _T &data, size_t &current_alignment)
 Template which calculates the encoded size of an instance of an enumeration of 8bits. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, uint8_t >::value >::type * = nullptr>
size_t calculate_serialized_size (const _T &data, size_t &current_alignment)
 Template which calculates the encoded size of an instance of an enumeration of unsigned 8bits. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const bool &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a bool. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const char &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a char. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const double &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a double. More...
 
template<class _T >
size_t calculate_serialized_size (const external< _T > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an external type. More...
 
template<size_t MAX_CHARS>
size_t calculate_serialized_size (const fixed_string< MAX_CHARS > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a fixed_string. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const float &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a float. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const int16_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a int16_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const int32_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a int32_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const int64_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a int64_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const int8_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an int8_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const long double &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a long double. More...
 
template<class _T >
size_t calculate_serialized_size (const optional< _T > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an optional type. More...
 
template<class _T , size_t _Size>
size_t calculate_serialized_size (const std::array< _T, _Size > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an array. More...
 
template<size_t N, typename std::enable_if<(N< 9) > ::type * = nullptr>
size_t calculate_serialized_size (const std::bitset< N > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a bitset of 8bits. More...
 
template<size_t N, typename std::enable_if<(8< N &&N< 17) > ::type * = nullptr>
size_t calculate_serialized_size (const std::bitset< N > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a bitset of 16bits. More...
 
template<size_t N, typename std::enable_if<(16< N &&N< 33) > ::type * = nullptr>
size_t calculate_serialized_size (const std::bitset< N > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a bitset of 32bits. More...
 
template<size_t N, typename std::enable_if<(32< N &&N< 65) > ::type * = nullptr>
size_t calculate_serialized_size (const std::bitset< N > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a bitset of 64bits. More...
 
template<class _K , class _V , typename std::enable_if<!std::is_enum< _V >::value &&!std::is_arithmetic< _V >::value >::type * = nullptr>
size_t calculate_serialized_size (const std::map< _K, _V > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a map of non-primitives. More...
 
template<class _K , class _V , typename std::enable_if< std::is_enum< _V >::value||std::is_arithmetic< _V >::value >::type * = nullptr>
size_t calculate_serialized_size (const std::map< _K, _V > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a map of primitives. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const std::string &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a std::string. More...
 
template<class _T , typename std::enable_if<!std::is_enum< _T >::value &&!std::is_arithmetic< _T >::value >::type * = nullptr>
size_t calculate_serialized_size (const std::vector< _T > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a sequence of non-primitives. More...
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value||std::is_arithmetic< _T >::value >::type * = nullptr>
size_t calculate_serialized_size (const std::vector< _T > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a sequence of primitives. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const std::vector< bool > &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a sequence of bool. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const std::wstring &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a std::wstring. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const uint16_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a uint16_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const uint32_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a uint32_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const uint64_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a uint64_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const uint8_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of an uint8_t. More...
 
TEMPLATE_SPEC size_t calculate_serialized_size (const wchar_t &data, size_t &current_alignment)
 Specific template which calculates the encoded size of an instance of a wchar. More...
 
Cdr_DllAPI CdrSizeCalculator (CdrVersion cdr_version)
 Constructor. More...
 
Cdr_DllAPI CdrSizeCalculator (CdrVersion cdr_version, EncodingAlgorithmFlag encoding)
 Constructor. More...
 
Cdr_DllAPI size_t end_calculate_type_serialized_size (EncodingAlgorithmFlag new_encoding, size_t &current_alignment)
 Indicates the ending of a constructed type. More...
 
Cdr_DllAPI CdrVersion get_cdr_version () const
 Retrieves the version of the encoding algorithm used by the instance. More...
 
Cdr_DllAPI EncodingAlgorithmFlag get_encoding () const
 Retrieves the current encoding algorithm used by the instance. More...
 

Private Types

enum  SerializedMemberSizeForNextInt { NO_SERIALIZED_MEMBER_SIZE, SERIALIZED_MEMBER_SIZE, SERIALIZED_MEMBER_SIZE_4, SERIALIZED_MEMBER_SIZE_8 }
 

Private Member Functions

size_t alignment (size_t current_alignment, size_t data_size) const
 
 CdrSizeCalculator ()=delete
 
template<class _T , typename std::enable_if< std::is_enum< _T >::value||std::is_arithmetic< _T >::value >::type * = nullptr>
constexpr SerializedMemberSizeForNextInt get_serialized_member_size () const
 

Private Attributes

size_t align64_ {4}
 Align for types equal or greater than 64bits. More...
 
CdrVersion cdr_version_ {CdrVersion::XCDRv2}
 
EncodingAlgorithmFlag current_encoding_ {EncodingAlgorithmFlag::PLAIN_CDR2}
 
enum eprosima::fastcdr::CdrSizeCalculator::SerializedMemberSizeForNextInt NO_SERIALIZED_MEMBER_SIZE
 Specifies if a DHEADER was serialized. Used to calculate XCDRv2 member headers. More...
 

Detailed Description

This class offers an interface to calculate the encoded size of a type serialized using a support encoding algorithm.

Definition at line 51 of file CdrSizeCalculator.hpp.

Member Enumeration Documentation

◆ SerializedMemberSizeForNextInt

Enumerator
NO_SERIALIZED_MEMBER_SIZE 
SERIALIZED_MEMBER_SIZE 
SERIALIZED_MEMBER_SIZE_4 
SERIALIZED_MEMBER_SIZE_8 

Definition at line 1308 of file CdrSizeCalculator.hpp.

Constructor & Destructor Documentation

◆ CdrSizeCalculator() [1/3]

eprosima::fastcdr::CdrSizeCalculator::CdrSizeCalculator ( CdrVersion  cdr_version)

Constructor.

Parameters
[in]cdr_versionRepresents the version of the encoding algorithm that will be used for the encoding. The default value is CdrVersion::XCDRv2.

Definition at line 20 of file CdrSizeCalculator.cpp.

◆ CdrSizeCalculator() [2/3]

eprosima::fastcdr::CdrSizeCalculator::CdrSizeCalculator ( CdrVersion  cdr_version,
EncodingAlgorithmFlag  encoding 
)

Constructor.

Parameters
[in]cdr_versionRepresents the version of the encoding algorithm that will be used for the encoding. The default value is CdrVersion::XCDRv2.
[in]encodingRepresents the initial encoding.

Definition at line 35 of file CdrSizeCalculator.cpp.

◆ CdrSizeCalculator() [3/3]

eprosima::fastcdr::CdrSizeCalculator::CdrSizeCalculator ( )
privatedelete

Member Function Documentation

◆ alignment()

size_t eprosima::fastcdr::CdrSizeCalculator::alignment ( size_t  current_alignment,
size_t  data_size 
) const
inlineprivate

Definition at line 1321 of file CdrSizeCalculator.hpp.

◆ begin_calculate_type_serialized_size()

size_t eprosima::fastcdr::CdrSizeCalculator::begin_calculate_type_serialized_size ( EncodingAlgorithmFlag  new_encoding,
size_t &  current_alignment 
)

Indicates a new constructed type will be calculated.

Parameters
[in]new_encodingNew encoding algorithm used for the constructed type.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
If new encoding algorithm encodes a header, return the encoded size of it.

Definition at line 53 of file CdrSizeCalculator.cpp.

◆ calculate_array_serialized_size() [1/18]

template<class _T >
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const _T *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of unknown type.

Template Parameters
_TArray's type.
Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 795 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [2/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const char *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of char.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 854 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [3/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const double *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of double.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 1024 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [4/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const float *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of float.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 1005 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [5/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const int16_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of int16_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 891 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [6/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const int32_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of int32_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 929 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [7/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const int64_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of int64_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 967 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [8/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const int8_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of int8_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 818 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [9/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const long double *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of long double.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 1043 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [10/18]

template<class _T , size_t _N>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const std::array< _T, _N > *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a multi-dimensional array.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 1062 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [11/18]

template<class _T , typename std::enable_if< std::is_enum< _T >::value||std::is_arithmetic< _T >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const std::vector< _T > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an std::vector of primitives as an array.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 1078 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [12/18]

template<class _T , typename std::enable_if<!std::is_enum< _T >::value &&!std::is_arithmetic< _T >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const std::vector< _T > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an std::vector of non-primitives as an array.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 1093 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [13/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const std::vector< bool > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an std::vector of bool as an array.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 1124 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [14/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const uint16_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of uint16_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 910 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [15/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const uint32_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of uint32_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 948 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [16/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const uint64_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of uint64_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 986 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [17/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const uint8_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of uint8_t.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 836 of file CdrSizeCalculator.hpp.

◆ calculate_array_serialized_size() [18/18]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_array_serialized_size ( const wchar_t *  data,
size_t  num_elements,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array of wchar.

Parameters
[in]dataReference to the array's instance.
[in]num_elementsNumber of elements in the array.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 872 of file CdrSizeCalculator.hpp.

◆ calculate_member_serialized_size() [1/2]

template<class _T >
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_member_serialized_size ( const MemberId id,
const _T &  data,
size_t &  current_alignment 
)
inline

Generic template which calculates the encoded size of the constructed type's member of a unknown type.

Template Parameters
_TMember's type.
Parameters
[in]idMember's identifier.
[in]dataReference to the member's instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the member's instance.

Definition at line 1141 of file CdrSizeCalculator.hpp.

◆ calculate_member_serialized_size() [2/2]

template<class _T >
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_member_serialized_size ( const MemberId id,
const optional< _T > &  data,
size_t &  current_alignment 
)
inline

Generic template which calculates the encoded size of the constructed type's member of type optional.

Template Parameters
_TMember's optional type.
Parameters
[in]idMember's identifier.
[in]dataReference to the member's instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the member's instance.

Definition at line 1214 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [1/36]

template<class _T , typename std::enable_if<!std::is_enum< _T >::value >::type * = nullptr, typename = void>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const _T &  data,
size_t &  current_alignment 
)
inline

Generic template which calculates the encoded size of an instance of an unknown type.

Template Parameters
_TInstance's type.
Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 93 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [2/36]

template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, int32_t >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const _T &  data,
size_t &  current_alignment 
)
inline

Template which calculates the encoded size of an instance of an enumeration of 32bits.

Template Parameters
_TInstance's type.
Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 111 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [3/36]

template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, uint32_t >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const _T &  data,
size_t &  current_alignment 
)
inline

Template which calculates the encoded size of an instance of an enumeration of unsigned 32bits.

Template Parameters
_TInstance's type.
Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 129 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [4/36]

template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, int16_t >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const _T &  data,
size_t &  current_alignment 
)
inline

Template which calculates the encoded size of an instance of an enumeration of 16bits.

Template Parameters
_TInstance's type.
Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 147 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [5/36]

template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, uint16_t >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const _T &  data,
size_t &  current_alignment 
)
inline

Template which calculates the encoded size of an instance of an enumeration of unsigned 16bits.

Template Parameters
_TInstance's type.
Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 165 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [6/36]

template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, int8_t >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const _T &  data,
size_t &  current_alignment 
)
inline

Template which calculates the encoded size of an instance of an enumeration of 8bits.

Template Parameters
_TInstance's type.
Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 183 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [7/36]

template<class _T , typename std::enable_if< std::is_enum< _T >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename std::underlying_type< _T >::type, uint8_t >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const _T &  data,
size_t &  current_alignment 
)
inline

Template which calculates the encoded size of an instance of an enumeration of unsigned 8bits.

Template Parameters
_TInstance's type.
Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 201 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [8/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const bool &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a bool.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 263 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [9/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const char &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a char.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 247 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [10/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const double &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a double.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 415 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [11/36]

template<class _T >
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const external< _T > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an external type.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Exceptions
exception::BadParamExceptionThis exception is thrown when the external is null.
Returns
Encoded size of the instance.

Definition at line 774 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [12/36]

template<size_t MAX_CHARS>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const fixed_string< MAX_CHARS > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a fixed_string.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 484 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [13/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const float &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a float.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 398 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [14/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const int16_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a int16_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 296 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [15/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const int32_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a int32_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 330 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [16/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const int64_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a int64_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 364 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [17/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const int8_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an int8_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 215 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [18/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const long double &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a long double.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 432 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [19/36]

template<class _T >
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const optional< _T > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an optional type.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 743 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [20/36]

template<class _T , size_t _Size>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::array< _T, _Size > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an array.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 579 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [21/36]

template<size_t N, typename std::enable_if<(N< 9) > ::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::bitset< N > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a bitset of 8bits.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 676 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [22/36]

template<size_t N, typename std::enable_if<(8< N &&N< 17) > ::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::bitset< N > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a bitset of 16bits.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 692 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [23/36]

template<size_t N, typename std::enable_if<(16< N &&N< 33) > ::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::bitset< N > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a bitset of 32bits.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 709 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [24/36]

template<size_t N, typename std::enable_if<(32< N &&N< 65) > ::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::bitset< N > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a bitset of 64bits.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 726 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [25/36]

template<class _K , class _V , typename std::enable_if<!std::is_enum< _V >::value &&!std::is_arithmetic< _V >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::map< _K, _V > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a map of non-primitives.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 613 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [26/36]

template<class _K , class _V , typename std::enable_if< std::is_enum< _V >::value||std::is_arithmetic< _V >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::map< _K, _V > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a map of primitives.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 651 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [27/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::string &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a std::string.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 449 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [28/36]

template<class _T , typename std::enable_if<!std::is_enum< _T >::value &&!std::is_arithmetic< _T >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::vector< _T > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a sequence of non-primitives.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 502 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [29/36]

template<class _T , typename std::enable_if< std::is_enum< _T >::value||std::is_arithmetic< _T >::value >::type * = nullptr>
size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::vector< _T > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a sequence of primitives.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 536 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [30/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::vector< bool > &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a sequence of bool.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 562 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [31/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const std::wstring &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a std::wstring.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 467 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [32/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const uint16_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a uint16_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 313 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [33/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const uint32_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a uint32_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 347 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [34/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const uint64_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a uint64_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 381 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [35/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const uint8_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of an uint8_t.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 231 of file CdrSizeCalculator.hpp.

◆ calculate_serialized_size() [36/36]

TEMPLATE_SPEC size_t eprosima::fastcdr::CdrSizeCalculator::calculate_serialized_size ( const wchar_t &  data,
size_t &  current_alignment 
)
inline

Specific template which calculates the encoded size of an instance of a wchar.

Parameters
[in]dataReference to the instance.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
Encoded size of the instance.

Definition at line 279 of file CdrSizeCalculator.hpp.

◆ end_calculate_type_serialized_size()

size_t eprosima::fastcdr::CdrSizeCalculator::end_calculate_type_serialized_size ( EncodingAlgorithmFlag  new_encoding,
size_t &  current_alignment 
)

Indicates the ending of a constructed type.

Parameters
[in]new_encodingNew encoding algorithm used after the constructed type.
[in,out]current_alignmentCurrent alignment in the encoding.
Returns
If current encoding algorithm encodes a final mark, return the encoded size of it.

Definition at line 72 of file CdrSizeCalculator.cpp.

◆ get_cdr_version()

CdrVersion eprosima::fastcdr::CdrSizeCalculator::get_cdr_version ( ) const

Retrieves the version of the encoding algorithm used by the instance.

Returns
Configured CdrVersion.

Definition at line 43 of file CdrSizeCalculator.cpp.

◆ get_encoding()

EncodingAlgorithmFlag eprosima::fastcdr::CdrSizeCalculator::get_encoding ( ) const

Retrieves the current encoding algorithm used by the instance.

Returns
Configured EncodingAlgorithmFlag.

Definition at line 48 of file CdrSizeCalculator.cpp.

◆ get_serialized_member_size()

template<class _T , typename std::enable_if< std::is_enum< _T >::value||std::is_arithmetic< _T >::value >::type * = nullptr>
constexpr SerializedMemberSizeForNextInt eprosima::fastcdr::CdrSizeCalculator::get_serialized_member_size ( ) const
inlineconstexprprivate

Definition at line 1330 of file CdrSizeCalculator.hpp.

Member Data Documentation

◆ align64_

size_t eprosima::fastcdr::CdrSizeCalculator::align64_ {4}
private

Align for types equal or greater than 64bits.

Definition at line 1319 of file CdrSizeCalculator.hpp.

◆ cdr_version_

CdrVersion eprosima::fastcdr::CdrSizeCalculator::cdr_version_ {CdrVersion::XCDRv2}
private

Definition at line 1304 of file CdrSizeCalculator.hpp.

◆ current_encoding_

EncodingAlgorithmFlag eprosima::fastcdr::CdrSizeCalculator::current_encoding_ {EncodingAlgorithmFlag::PLAIN_CDR2}
private

Definition at line 1306 of file CdrSizeCalculator.hpp.

◆ NO_SERIALIZED_MEMBER_SIZE

enum eprosima::fastcdr::CdrSizeCalculator::SerializedMemberSizeForNextInt eprosima::fastcdr::CdrSizeCalculator::NO_SERIALIZED_MEMBER_SIZE
private

Specifies if a DHEADER was serialized. Used to calculate XCDRv2 member headers.


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


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