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
5959bool 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
135135std::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
175175bool 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
254254bool 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
330330std::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
370370bool 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
447447bool 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
523523std::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
563563bool 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),
0 commit comments