Skip to content

Commit 3c1b312

Browse files
committed
Refs #20335: regenerate types
Signed-off-by: JLBuenoLopez-eProsima <joseluisbueno@eprosima.com>
1 parent ae0c6a1 commit 3c1b312

34 files changed

Lines changed: 77307 additions & 156 deletions

fastdds_python/test/types/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2929

3030
#Create library for C++ types
3131
add_library(${PROJECT_NAME} SHARED
32+
test_included_modulesTypeObjectSupport.cxx
3233
test_included_modulesPubSubTypes.cxx
3334
)
3435
if(WIN32)
@@ -135,6 +136,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
135136

136137
#Create library for C++ types
137138
add_library(${PROJECT_NAME} SHARED
139+
test_modulesTypeObjectSupport.cxx
138140
test_modulesPubSubTypes.cxx
139141
)
140142
if(WIN32)
@@ -241,6 +243,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
241243

242244
#Create library for C++ types
243245
add_library(${PROJECT_NAME} SHARED
246+
test_completeTypeObjectSupport.cxx
244247
test_completePubSubTypes.cxx
245248
)
246249
if(WIN32)

fastdds_python/test/types/test_complete.hpp

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,13 @@
2323
#define _FAST_DDS_GENERATED_TEST_COMPLETE_HPP_
2424

2525
#include <array>
26-
#include <bitset>
2726
#include <cstdint>
28-
#include <map>
2927
#include <string>
3028
#include <utility>
3129
#include <vector>
3230

3331
#include <fastcdr/cdr/fixed_size_string.hpp>
34-
#include <fastcdr/xcdr/external.hpp>
3532
#include <fastcdr/xcdr/optional.hpp>
36-
#include <fastcdr/exceptions/BadParamException.h>
37-
3833
#include "test_included_modules.hpp"
3934

4035
#if defined(_WIN32)
@@ -65,7 +60,7 @@
6560
* @brief This class represents the enumeration Color defined by the user in the IDL file.
6661
* @ingroup test_complete
6762
*/
68-
enum Color : uint32_t
63+
enum class Color : uint32_t
6964
{
7065
RED,
7166
GREEN,
@@ -77,16 +72,14 @@ enum Color : uint32_t
7772
* @brief This class represents the enumeration Material defined by the user in the IDL file.
7873
* @ingroup test_complete
7974
*/
80-
enum Material : uint32_t
75+
enum class Material : uint32_t
8176
{
8277
WOOD,
8378
PLASTIC,
8479
METAL,
8580
CONCRETE,
8681
STONE
8782
};
88-
89-
9083
/*!
9184
* @brief This class represents the structure StructType defined by the user in the IDL file.
9285
* @ingroup test_complete
@@ -743,15 +736,13 @@ class StructType
743736
double m_double_field{0.0};
744737
bool m_bool_field{false};
745738
std::string m_string_field;
746-
Color m_enum_field{::RED};
747-
Material m_enum2_field{::WOOD};
739+
Color m_enum_field{Color::RED};
740+
Material m_enum2_field{Material::WOOD};
748741
eprosima::test2::StructType2 m_included_module_struct;
749742

750743
};
751744
const uint32_t max_array_size = 3;
752745
const uint32_t max_seq_size = 5;
753-
754-
755746
/*!
756747
* @brief This class represents the structure CompleteTestType defined by the user in the IDL file.
757748
* @ingroup test_complete
@@ -4030,8 +4021,8 @@ class CompleteTestType
40304021
double m_double_field{0.0};
40314022
bool m_bool_field{false};
40324023
std::string m_string_field;
4033-
Color m_enum_field{::RED};
4034-
Material m_enum2_field{::WOOD};
4024+
Color m_enum_field{Color::RED};
4025+
Material m_enum2_field{Material::WOOD};
40354026
StructType m_struct_field;
40364027
eprosima::fastcdr::optional<char> m_char_opt_field;
40374028
eprosima::fastcdr::optional<uint8_t> m_uint8_opt_field;
@@ -4059,8 +4050,8 @@ class CompleteTestType
40594050
std::array<float, max_array_size> m_array_float_field{0.0};
40604051
std::array<double, max_array_size> m_array_double_field{0.0};
40614052
std::array<bool, max_array_size> m_array_bool_field{false};
4062-
std::array<Color, max_array_size> m_array_enum_field{::RED};
4063-
std::array<Material, max_array_size> m_array_enum2_field{::WOOD};
4053+
std::array<Color, max_array_size> m_array_enum_field{Color::RED};
4054+
std::array<Material, max_array_size> m_array_enum2_field{Material::WOOD};
40644055
std::array<StructType, max_array_size> m_array_struct_field;
40654056
std::vector<char> m_bounded_sequence_char_field;
40664057
std::vector<uint8_t> m_bounded_sequence_uint8_field;
@@ -4092,8 +4083,6 @@ class CompleteTestType
40924083
std::vector<StructType> m_unbounded_sequence_struct_field;
40934084

40944085
};
4095-
4096-
40974086
/*!
40984087
* @brief This class represents the structure KeyedCompleteTestType defined by the user in the IDL file.
40994088
* @ingroup test_complete
@@ -7409,8 +7398,8 @@ class KeyedCompleteTestType
74097398
double m_double_field{0.0};
74107399
bool m_bool_field{false};
74117400
std::string m_string_field;
7412-
Color m_enum_field{::RED};
7413-
Material m_enum2_field{::WOOD};
7401+
Color m_enum_field{Color::RED};
7402+
Material m_enum2_field{Material::WOOD};
74147403
StructType m_struct_field;
74157404
eprosima::fastcdr::optional<char> m_char_opt_field;
74167405
eprosima::fastcdr::optional<uint8_t> m_uint8_opt_field;
@@ -7438,8 +7427,8 @@ class KeyedCompleteTestType
74387427
std::array<float, max_array_size> m_array_float_field{0.0};
74397428
std::array<double, max_array_size> m_array_double_field{0.0};
74407429
std::array<bool, max_array_size> m_array_bool_field{false};
7441-
std::array<Color, max_array_size> m_array_enum_field{::RED};
7442-
std::array<Material, max_array_size> m_array_enum2_field{::WOOD};
7430+
std::array<Color, max_array_size> m_array_enum_field{Color::RED};
7431+
std::array<Material, max_array_size> m_array_enum2_field{Material::WOOD};
74437432
std::array<StructType, max_array_size> m_array_struct_field;
74447433
std::vector<char> m_bounded_sequence_char_field;
74457434
std::vector<uint8_t> m_bounded_sequence_uint8_field;

fastdds_python/test/types/test_complete.i

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ namespace swig {
6868

6969
%traits_penumn(enum Color);
7070
%traits_penumn(enum Material);
71-
72-
7371
////////////////////////////////////////////////////////
7472
// Binding for class StructType
7573
////////////////////////////////////////////////////////
@@ -262,8 +260,6 @@ namespace swig {
262260

263261

264262

265-
266-
267263
////////////////////////////////////////////////////////
268264
// Binding for class CompleteTestType
269265
////////////////////////////////////////////////////////
@@ -1547,8 +1543,6 @@ namespace swig {
15471543
}
15481544
}
15491545

1550-
1551-
15521546
////////////////////////////////////////////////////////
15531547
// Binding for class KeyedCompleteTestType
15541548
////////////////////////////////////////////////////////

fastdds_python/test/types/test_completeCdrAux.hpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#include "test_complete.hpp"
2626

27-
constexpr uint32_t CompleteTestType_max_cdr_typesize {78608UL};
27+
constexpr uint32_t CompleteTestType_max_cdr_typesize {7900UL};
2828
constexpr uint32_t CompleteTestType_max_key_cdr_typesize {0UL};
2929

3030

@@ -34,7 +34,7 @@ constexpr uint32_t StructType_max_key_cdr_typesize {0UL};
3434

3535

3636

37-
constexpr uint32_t KeyedCompleteTestType_max_cdr_typesize {78608UL};
37+
constexpr uint32_t KeyedCompleteTestType_max_cdr_typesize {7900UL};
3838
constexpr uint32_t KeyedCompleteTestType_max_key_cdr_typesize {4UL};
3939

4040

@@ -45,22 +45,16 @@ namespace fastcdr {
4545
class Cdr;
4646
class CdrSizeCalculator;
4747

48-
49-
5048
eProsima_user_DllExport void serialize_key(
5149
eprosima::fastcdr::Cdr& scdr,
5250
const StructType& data);
5351

5452

5553

56-
57-
5854
eProsima_user_DllExport void serialize_key(
5955
eprosima::fastcdr::Cdr& scdr,
6056
const CompleteTestType& data);
6157

62-
63-
6458
eProsima_user_DllExport void serialize_key(
6559
eprosima::fastcdr::Cdr& scdr,
6660
const KeyedCompleteTestType& data);

fastdds_python/test/types/test_completeCdrAux.ipp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ using namespace eprosima::fastcdr::exception;
3434
namespace eprosima {
3535
namespace fastcdr {
3636

37-
38-
3937
template<>
4038
eProsima_user_DllExport size_t calculate_serialized_size(
4139
eprosima::fastcdr::CdrSizeCalculator& calculator,
@@ -226,8 +224,6 @@ void serialize_key(
226224

227225

228226

229-
230-
231227
template<>
232228
eProsima_user_DllExport size_t calculate_serialized_size(
233229
eprosima::fastcdr::CdrSizeCalculator& calculator,
@@ -872,8 +868,6 @@ void serialize_key(
872868
}
873869

874870

875-
876-
877871
template<>
878872
eProsima_user_DllExport size_t calculate_serialized_size(
879873
eprosima::fastcdr::CdrSizeCalculator& calculator,

fastdds_python/test/types/test_completePubSubTypes.cxx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
* This file was generated by the tool fastddsgen.
2020
*/
2121

22+
#include "test_completePubSubTypes.h"
2223

24+
#include <fastdds/dds/log/Log.hpp>
2325
#include <fastdds/rtps/common/CdrSerialization.hpp>
2426

25-
#include "test_completePubSubTypes.h"
2627
#include "test_completeCdrAux.hpp"
28+
#include "test_completeTypeObjectSupport.hpp"
2729

2830
using SerializedPayload_t = eprosima::fastrtps::rtps::SerializedPayload_t;
2931
using InstanceHandle_t = eprosima::fastrtps::rtps::InstanceHandle_t;
3032
using DataRepresentationId_t = eprosima::fastdds::dds::DataRepresentationId_t;
3133

32-
33-
3434
StructTypePubSubType::StructTypePubSubType()
3535
{
3636
setName("StructType");
@@ -219,7 +219,10 @@ bool StructTypePubSubType::getKey(
219219
return true;
220220
}
221221

222-
222+
void StructTypePubSubType::register_type_object_representation() const
223+
{
224+
register_test_complete_type_objects();
225+
}
223226

224227

225228

@@ -411,7 +414,10 @@ bool CompleteTestTypePubSubType::getKey(
411414
return true;
412415
}
413416

414-
417+
void CompleteTestTypePubSubType::register_type_object_representation() const
418+
{
419+
register_test_complete_type_objects();
420+
}
415421

416422
KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType()
417423
{
@@ -601,6 +607,11 @@ bool KeyedCompleteTestTypePubSubType::getKey(
601607
return true;
602608
}
603609

610+
void KeyedCompleteTestTypePubSubType::register_type_object_representation() const
611+
{
612+
register_test_complete_type_objects();
613+
}
614+
604615

605616
// Include auxiliary functions like for serializing/deserializing.
606617
#include "test_completeCdrAux.ipp"

fastdds_python/test/types/test_completePubSubTypes.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
#endif // GEN_API_VER
4040

4141

42-
43-
4442
/*!
4543
* @brief This class represents the TopicDataType of the type StructType defined by the user in the IDL file.
4644
* @ingroup test_complete
@@ -91,6 +89,9 @@ class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType
9189
eProsima_user_DllExport void deleteData(
9290
void* data) override;
9391

92+
//Register TypeObject representation in Fast DDS TypeObjectRegistry
93+
eProsima_user_DllExport void register_type_object_representation() const override;
94+
9495
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
9596
eProsima_user_DllExport inline bool is_bounded() const override
9697
{
@@ -131,8 +132,6 @@ class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType
131132

132133

133134

134-
135-
136135
/*!
137136
* @brief This class represents the TopicDataType of the type CompleteTestType defined by the user in the IDL file.
138137
* @ingroup test_complete
@@ -183,6 +182,9 @@ class CompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType
183182
eProsima_user_DllExport void deleteData(
184183
void* data) override;
185184

185+
//Register TypeObject representation in Fast DDS TypeObjectRegistry
186+
eProsima_user_DllExport void register_type_object_representation() const override;
187+
186188
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
187189
eProsima_user_DllExport inline bool is_bounded() const override
188190
{
@@ -221,8 +223,6 @@ class CompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType
221223

222224
};
223225

224-
225-
226226
/*!
227227
* @brief This class represents the TopicDataType of the type KeyedCompleteTestType defined by the user in the IDL file.
228228
* @ingroup test_complete
@@ -273,6 +273,9 @@ class KeyedCompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicData
273273
eProsima_user_DllExport void deleteData(
274274
void* data) override;
275275

276+
//Register TypeObject representation in Fast DDS TypeObjectRegistry
277+
eProsima_user_DllExport void register_type_object_representation() const override;
278+
276279
#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
277280
eProsima_user_DllExport inline bool is_bounded() const override
278281
{

0 commit comments

Comments
 (0)