Skip to content

Commit bd3507b

Browse files
committed
Refs #21128: Update types with Gen's PR
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
1 parent 60b34d6 commit bd3507b

30 files changed

Lines changed: 906 additions & 126 deletions

fastdds_python/test/types/test_complete.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
* @brief This class represents the enumeration Color defined by the user in the IDL file.
6161
* @ingroup test_complete
6262
*/
63-
enum class Color : uint32_t
63+
enum class Color : int32_t
6464
{
6565
RED,
6666
GREEN,
@@ -72,7 +72,7 @@ enum class Color : uint32_t
7272
* @brief This class represents the enumeration Material defined by the user in the IDL file.
7373
* @ingroup test_complete
7474
*/
75-
enum class Material : uint32_t
75+
enum class Material : int32_t
7676
{
7777
WOOD,
7878
PLASTIC,

fastdds_python/test/types/test_completeCdrAux.hpp

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

22-
#ifndef _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_HPP_
23-
#define _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_HPP_
22+
#ifndef FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_HPP
23+
#define FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_HPP
2424

2525
#include "test_complete.hpp"
2626

@@ -63,5 +63,5 @@ eProsima_user_DllExport void serialize_key(
6363
} // namespace fastcdr
6464
} // namespace eprosima
6565

66-
#endif // _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_HPP_
66+
#endif // FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_HPP
6767

fastdds_python/test/types/test_completeCdrAux.ipp

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

22-
#ifndef _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_IPP_
23-
#define _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_IPP_
22+
#ifndef FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_IPP
23+
#define FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_IPP
2424

2525
#include "test_completeCdrAux.hpp"
2626

@@ -1598,5 +1598,5 @@ void serialize_key(
15981598
} // namespace fastcdr
15991599
} // namespace eprosima
16001600

1601-
#endif // _FAST_DDS_GENERATED_TEST_COMPLETECDRAUX_IPP_
1601+
#endif // FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_IPP
16021602

fastdds_python/test/types/test_completePubSubTypes.cxx

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

22-
#include "test_completePubSubTypes.h"
22+
#include "test_completePubSubTypes.hpp"
2323

2424
#include <fastdds/dds/log/Log.hpp>
2525
#include <fastdds/rtps/common/CdrSerialization.hpp>
@@ -57,11 +57,11 @@ StructTypePubSubType::~StructTypePubSubType()
5757
}
5858

5959
bool StructTypePubSubType::serialize(
60-
void* data,
60+
const void* const data,
6161
SerializedPayload_t* payload,
6262
DataRepresentationId_t data_representation)
6363
{
64-
StructType* p_type = static_cast<StructType*>(data);
64+
const StructType* p_type = static_cast<const StructType*>(data);
6565

6666
// Object that manages the raw buffer.
6767
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->max_size);
@@ -133,7 +133,7 @@ bool StructTypePubSubType::deserialize(
133133
}
134134

135135
std::function<uint32_t()> StructTypePubSubType::getSerializedSizeProvider(
136-
void* data,
136+
const void* const data,
137137
DataRepresentationId_t data_representation)
138138
{
139139
return [data, data_representation]() -> uint32_t
@@ -150,7 +150,7 @@ std::function<uint32_t()> StructTypePubSubType::getSerializedSizeProvider(
150150
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
151151
size_t current_alignment {0};
152152
return static_cast<uint32_t>(calculator.calculate_serialized_size(
153-
*static_cast<StructType*>(data), current_alignment)) +
153+
*static_cast<const StructType*>(data), current_alignment)) +
154154
4u /*encapsulation*/;
155155
}
156156
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
@@ -173,7 +173,7 @@ void StructTypePubSubType::deleteData(
173173
}
174174

175175
bool StructTypePubSubType::getKey(
176-
void* data,
176+
const void* const data,
177177
InstanceHandle_t* handle,
178178
bool force_md5)
179179
{
@@ -182,7 +182,7 @@ bool StructTypePubSubType::getKey(
182182
return false;
183183
}
184184

185-
StructType* p_type = static_cast<StructType*>(data);
185+
const StructType* p_type = static_cast<const StructType*>(data);
186186

187187
// Object that manages the raw buffer.
188188
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(m_keyBuffer),
@@ -252,11 +252,11 @@ CompleteTestTypePubSubType::~CompleteTestTypePubSubType()
252252
}
253253

254254
bool CompleteTestTypePubSubType::serialize(
255-
void* data,
255+
const void* const data,
256256
SerializedPayload_t* payload,
257257
DataRepresentationId_t data_representation)
258258
{
259-
CompleteTestType* p_type = static_cast<CompleteTestType*>(data);
259+
const CompleteTestType* p_type = static_cast<const CompleteTestType*>(data);
260260

261261
// Object that manages the raw buffer.
262262
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->max_size);
@@ -328,7 +328,7 @@ bool CompleteTestTypePubSubType::deserialize(
328328
}
329329

330330
std::function<uint32_t()> CompleteTestTypePubSubType::getSerializedSizeProvider(
331-
void* data,
331+
const void* const data,
332332
DataRepresentationId_t data_representation)
333333
{
334334
return [data, data_representation]() -> uint32_t
@@ -345,7 +345,7 @@ std::function<uint32_t()> CompleteTestTypePubSubType::getSerializedSizeProvider(
345345
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
346346
size_t current_alignment {0};
347347
return static_cast<uint32_t>(calculator.calculate_serialized_size(
348-
*static_cast<CompleteTestType*>(data), current_alignment)) +
348+
*static_cast<const CompleteTestType*>(data), current_alignment)) +
349349
4u /*encapsulation*/;
350350
}
351351
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
@@ -368,7 +368,7 @@ void CompleteTestTypePubSubType::deleteData(
368368
}
369369

370370
bool CompleteTestTypePubSubType::getKey(
371-
void* data,
371+
const void* const data,
372372
InstanceHandle_t* handle,
373373
bool force_md5)
374374
{
@@ -377,7 +377,7 @@ bool CompleteTestTypePubSubType::getKey(
377377
return false;
378378
}
379379

380-
CompleteTestType* p_type = static_cast<CompleteTestType*>(data);
380+
const CompleteTestType* p_type = static_cast<const CompleteTestType*>(data);
381381

382382
// Object that manages the raw buffer.
383383
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(m_keyBuffer),
@@ -445,11 +445,11 @@ KeyedCompleteTestTypePubSubType::~KeyedCompleteTestTypePubSubType()
445445
}
446446

447447
bool KeyedCompleteTestTypePubSubType::serialize(
448-
void* data,
448+
const void* const data,
449449
SerializedPayload_t* payload,
450450
DataRepresentationId_t data_representation)
451451
{
452-
KeyedCompleteTestType* p_type = static_cast<KeyedCompleteTestType*>(data);
452+
const KeyedCompleteTestType* p_type = static_cast<const KeyedCompleteTestType*>(data);
453453

454454
// Object that manages the raw buffer.
455455
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload->data), payload->max_size);
@@ -521,7 +521,7 @@ bool KeyedCompleteTestTypePubSubType::deserialize(
521521
}
522522

523523
std::function<uint32_t()> KeyedCompleteTestTypePubSubType::getSerializedSizeProvider(
524-
void* data,
524+
const void* const data,
525525
DataRepresentationId_t data_representation)
526526
{
527527
return [data, data_representation]() -> uint32_t
@@ -538,7 +538,7 @@ std::function<uint32_t()> KeyedCompleteTestTypePubSubType::getSerializedSizeProv
538538
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
539539
size_t current_alignment {0};
540540
return static_cast<uint32_t>(calculator.calculate_serialized_size(
541-
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
541+
*static_cast<const KeyedCompleteTestType*>(data), current_alignment)) +
542542
4u /*encapsulation*/;
543543
}
544544
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
@@ -561,7 +561,7 @@ void KeyedCompleteTestTypePubSubType::deleteData(
561561
}
562562

563563
bool KeyedCompleteTestTypePubSubType::getKey(
564-
void* data,
564+
const void* const data,
565565
InstanceHandle_t* handle,
566566
bool force_md5)
567567
{
@@ -570,7 +570,7 @@ bool KeyedCompleteTestTypePubSubType::getKey(
570570
return false;
571571
}
572572

573-
KeyedCompleteTestType* p_type = static_cast<KeyedCompleteTestType*>(data);
573+
const KeyedCompleteTestType* p_type = static_cast<const KeyedCompleteTestType*>(data);
574574

575575
// Object that manages the raw buffer.
576576
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(m_keyBuffer),

fastdds_python/test/types/test_completePubSubTypes.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525

2626
#include <fastdds/dds/core/policy/QosPolicies.hpp>
2727
#include <fastdds/dds/topic/TopicDataType.hpp>
28-
#include <fastdds/rtps/common/InstanceHandle.h>
29-
#include <fastdds/rtps/common/SerializedPayload.h>
30-
#include <fastdds/utils/md5.h>
28+
#include <fastdds/rtps/common/InstanceHandle.hpp>
29+
#include <fastdds/rtps/common/SerializedPayload.hpp>
30+
#include <fastdds/utils/md5.hpp>
3131

3232
#include "test_complete.hpp"
3333

34-
#include "test_included_modulesPubSubTypes.h"
34+
#include "test_included_modulesPubSubTypes.hpp"
3535

3636
#if !defined(GEN_API_VER) || (GEN_API_VER != 2)
3737
#error \

0 commit comments

Comments
 (0)