22 : cdr_version_(cdr_version)
55 size_t& current_alignment)
57 size_t calculated_size {0};
62 calculated_size = 4 +
alignment(current_alignment, 4);
65 current_alignment += calculated_size;
69 return calculated_size;
74 size_t& current_alignment)
76 size_t calculated_size {0};
80 calculated_size = 4 +
alignment(current_alignment, 4);
87 current_alignment += calculated_size;
91 return calculated_size;
This class offers an interface to calculate the encoded size of a type serialized using a support enc...
enum eprosima::fastcdr::CdrSizeCalculator::SerializedMemberSizeForNextInt NO_SERIALIZED_MEMBER_SIZE
Specifies if a DHEADER was serialized. Used to calculate XCDRv2 member headers.
Cdr_DllAPI EncodingAlgorithmFlag get_encoding() const
Retrieves the current encoding algorithm used by the instance.
Cdr_DllAPI CdrVersion get_cdr_version() const
Retrieves the version of the encoding algorithm used by the instance.
Cdr_DllAPI size_t begin_calculate_type_serialized_size(EncodingAlgorithmFlag new_encoding, size_t ¤t_alignment)
Indicates a new constructed type will be calculated.
Cdr_DllAPI size_t end_calculate_type_serialized_size(EncodingAlgorithmFlag new_encoding, size_t ¤t_alignment)
Indicates the ending of a constructed type.
CdrSizeCalculator()=delete
size_t alignment(size_t current_alignment, size_t data_size) const
EncodingAlgorithmFlag current_encoding_
size_t align64_
Align for types equal or greater than 64bits.
EncodingAlgorithmFlag
This enumeration represents the supported XCDR encoding algorithms.
@ PLAIN_CDR
Specifies that the content is PLAIN_CDR.
@ PLAIN_CDR2
Specifies that the content is PLAIN_CDR2.
@ PL_CDR
Specifies that the content is PL_CDR,.
CdrVersion
This enumeration represents the kinds of CDR serialization supported by eprosima::fastcdr::CDR.
@ XCDRv1
XCDRv1 encoding defined by standard DDS X-Types 1.3.
@ XCDRv2
XCDRv2 encoding defined by standard DDS X-Types 1.3.