Skip to content

Commit

Permalink
Refs #20176: Regenerate types with latest Gen version
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso committed Jan 10, 2024
1 parent eb271e1 commit 82af2f3
Show file tree
Hide file tree
Showing 12 changed files with 136 additions and 164 deletions.
3 changes: 0 additions & 3 deletions fastdds_python/test/types/test_complete.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ char dummy;

#include "test_complete.h"

#if FASTCDR_VERSION_MAJOR > 1

#include <fastcdr/Cdr.h>


Expand Down Expand Up @@ -6823,4 +6821,3 @@ std::vector<StructType>& KeyedCompleteTestType::unbounded_sequence_struct_field(
// Include auxiliary functions like for serializing/deserializing.
#include "test_completeCdrAux.ipp"

#endif // FASTCDR_VERSION_MAJOR > 1
6 changes: 0 additions & 6 deletions fastdds_python/test/types/test_complete.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
* This file was generated by the tool fastddsgen.
*/

#include <fastcdr/config.h>
#include "test_completev1.h"

#if FASTCDR_VERSION_MAJOR > 1

#ifndef _FAST_DDS_GENERATED_TEST_COMPLETE_H_
#define _FAST_DDS_GENERATED_TEST_COMPLETE_H_

Expand Down Expand Up @@ -4504,4 +4499,3 @@ class KeyedCompleteTestType



#endif // FASTCDR_VERSION_MAJOR > 1
99 changes: 51 additions & 48 deletions fastdds_python/test/types/test_completePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ StructTypePubSubType::StructTypePubSubType()
setName("StructType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
StructType::getMaxCdrSerializedSize();
static_cast<uint32_t>(StructType::getMaxCdrSerializedSize());
#else
StructType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -139,23 +139,24 @@ std::function<uint32_t()> StructTypePubSubType::getSerializedSizeProvider(
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down Expand Up @@ -231,7 +232,7 @@ CompleteTestTypePubSubType::CompleteTestTypePubSubType()
setName("CompleteTestType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
CompleteTestType::getMaxCdrSerializedSize();
static_cast<uint32_t>(CompleteTestType::getMaxCdrSerializedSize());
#else
CompleteTestType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -334,23 +335,24 @@ std::function<uint32_t()> CompleteTestTypePubSubType::getSerializedSizeProvider(
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<CompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<CompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down Expand Up @@ -422,7 +424,7 @@ KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType()
setName("KeyedCompleteTestType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
KeyedCompleteTestType::getMaxCdrSerializedSize();
static_cast<uint32_t>(KeyedCompleteTestType::getMaxCdrSerializedSize());
#else
KeyedCompleteTestType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -525,23 +527,24 @@ std::function<uint32_t()> KeyedCompleteTestTypePubSubType::getSerializedSizeProv
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down
3 changes: 0 additions & 3 deletions fastdds_python/test/types/test_included_modules.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ char dummy;

#include "test_included_modules.h"

#if FASTCDR_VERSION_MAJOR > 1

#include <fastcdr/Cdr.h>


Expand Down Expand Up @@ -583,4 +581,3 @@ eprosima::test2::Material2& StructType2::enum2_field()
// Include auxiliary functions like for serializing/deserializing.
#include "test_included_modulesCdrAux.ipp"

#endif // FASTCDR_VERSION_MAJOR > 1
6 changes: 0 additions & 6 deletions fastdds_python/test/types/test_included_modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
* This file was generated by the tool fastddsgen.
*/

#include <fastcdr/config.h>
#include "test_included_modulesv1.h"

#if FASTCDR_VERSION_MAJOR > 1

#ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULES_H_
#define _FAST_DDS_GENERATED_EPROSIMA_TEST2_TEST_INCLUDED_MODULES_H_

Expand Down Expand Up @@ -476,4 +471,3 @@ class StructType2



#endif // FASTCDR_VERSION_MAJOR > 1
33 changes: 17 additions & 16 deletions fastdds_python/test/types/test_included_modulesPubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace eprosima {
setName("eprosima::test2::StructType2");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
StructType2::getMaxCdrSerializedSize();
static_cast<uint32_t>(StructType2::getMaxCdrSerializedSize());
#else
eprosima_test2_StructType2_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -141,23 +141,24 @@ namespace eprosima {
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType2*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType2*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType2*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType2*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down
3 changes: 0 additions & 3 deletions fastdds_python/test/types/test_modules.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ char dummy;

#include "test_modules.h"

#if FASTCDR_VERSION_MAJOR > 1

#include <fastcdr/Cdr.h>


Expand Down Expand Up @@ -6789,4 +6787,3 @@ std::vector<eprosima::test::StructType>& KeyedCompleteTestType::unbounded_sequen
// Include auxiliary functions like for serializing/deserializing.
#include "test_modulesCdrAux.ipp"

#endif // FASTCDR_VERSION_MAJOR > 1
6 changes: 0 additions & 6 deletions fastdds_python/test/types/test_modules.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@
* This file was generated by the tool fastddsgen.
*/

#include <fastcdr/config.h>
#include "test_modulesv1.h"

#if FASTCDR_VERSION_MAJOR > 1

#ifndef _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULES_H_
#define _FAST_DDS_GENERATED_EPROSIMA_TEST_TEST_MODULES_H_

Expand Down Expand Up @@ -4483,4 +4478,3 @@ class KeyedCompleteTestType



#endif // FASTCDR_VERSION_MAJOR > 1
Loading

0 comments on commit 82af2f3

Please sign in to comment.