Skip to content

Commit b6ff021

Browse files
Regenerate code with Fast DDS Gen v2.5.3 (#202)
* Refs #22188. Regenerate Shape with Fast DDS Gen v2.5.3 Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> * Refs #22188. Regenerate KeylessShape with Fast DDS Gen v2.5.3 Signed-off-by: Miguel Company <MiguelCompany@eprosima.com> --------- Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
1 parent f6d8f93 commit b6ff021

12 files changed

+76
-52
lines changed

types/KeylessShapeType.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file KeylessShapeType.cpp
1717
* This source file contains the definition of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool gen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222
#ifdef _WIN32
@@ -309,3 +309,4 @@ void shapes_demo_typesupport::idl::KeylessShapeType::serializeKey(
309309
}
310310

311311

312+

types/KeylessShapeType.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file KeylessShapeType.h
1717
* This header file contains the declaration of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool gen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222
#ifndef _FAST_DDS_GENERATED_SHAPES_DEMO_TYPESUPPORT_IDL_KEYLESSSHAPETYPE_H_
@@ -44,16 +44,16 @@
4444

4545
#if defined(_WIN32)
4646
#if defined(EPROSIMA_USER_DLL_EXPORT)
47-
#if defined(KeylessShapeType_SOURCE)
48-
#define KeylessShapeType_DllAPI __declspec( dllexport )
47+
#if defined(KEYLESSSHAPETYPE_SOURCE)
48+
#define KEYLESSSHAPETYPE_DllAPI __declspec( dllexport )
4949
#else
50-
#define KeylessShapeType_DllAPI __declspec( dllimport )
51-
#endif // KeylessShapeType_SOURCE
50+
#define KEYLESSSHAPETYPE_DllAPI __declspec( dllimport )
51+
#endif // KEYLESSSHAPETYPE_SOURCE
5252
#else
53-
#define KeylessShapeType_DllAPI
53+
#define KEYLESSSHAPETYPE_DllAPI
5454
#endif // EPROSIMA_USER_DLL_EXPORT
5555
#else
56-
#define KeylessShapeType_DllAPI
56+
#define KEYLESSSHAPETYPE_DllAPI
5757
#endif // _WIN32
5858

5959
namespace eprosima {
@@ -67,7 +67,7 @@ namespace shapes_demo_typesupport {
6767
namespace idl {
6868
/*!
6969
* @brief This class represents the structure KeylessShapeType defined by the user in the IDL file.
70-
* @ingroup KEYLESSSHAPETYPE
70+
* @ingroup KeylessShapeType
7171
*/
7272
class KeylessShapeType
7373
{
@@ -276,4 +276,5 @@ namespace shapes_demo_typesupport {
276276
} // namespace idl
277277
} // namespace shapes_demo_typesupport
278278

279-
#endif // _FAST_DDS_GENERATED_SHAPES_DEMO_TYPESUPPORT_IDL_KEYLESSSHAPETYPE_H_
279+
#endif // _FAST_DDS_GENERATED_SHAPES_DEMO_TYPESUPPORT_IDL_KEYLESSSHAPETYPE_H_
280+

types/KeylessShapeTypePubSubTypes.cxx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file KeylessShapeTypePubSubTypes.cpp
1717
* This header file contains the implementation of the serialization functions.
1818
*
19-
* This file was generated by the tool fastcdrgen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222

@@ -62,15 +62,15 @@ namespace shapes_demo_typesupport {
6262
// Object that serializes the data.
6363
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR);
6464
payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE;
65-
// Serialize encapsulation
66-
ser.serialize_encapsulation();
6765

6866
try
6967
{
68+
// Serialize encapsulation
69+
ser.serialize_encapsulation();
7070
// Serialize the object.
7171
p_type->serialize(ser);
7272
}
73-
catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/)
73+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
7474
{
7575
return false;
7676
}
@@ -86,7 +86,7 @@ namespace shapes_demo_typesupport {
8686
{
8787
try
8888
{
89-
//Convert DATA to pointer of your type
89+
// Convert DATA to pointer of your type
9090
KeylessShapeType* p_type = static_cast<KeylessShapeType*>(data);
9191

9292
// Object that manages the raw buffer.
@@ -102,7 +102,7 @@ namespace shapes_demo_typesupport {
102102
// Deserialize the object.
103103
p_type->deserialize(deser);
104104
}
105-
catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/)
105+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
106106
{
107107
return false;
108108
}
@@ -173,4 +173,6 @@ namespace shapes_demo_typesupport {
173173

174174
} //End of namespace idl
175175

176+
176177
} //End of namespace shapes_demo_typesupport
178+

types/KeylessShapeTypePubSubTypes.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file KeylessShapeTypePubSubTypes.h
1717
* This header file contains the declaration of the serialization functions.
1818
*
19-
* This file was generated by the tool fastcdrgen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222

@@ -28,6 +28,7 @@
2828

2929
#include "KeylessShapeType.h"
3030

31+
3132
#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
3233
#error \
3334
Generated KeylessShapeType is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
@@ -37,9 +38,10 @@ namespace shapes_demo_typesupport
3738
{
3839
namespace idl
3940
{
41+
4042
/*!
4143
* @brief This class represents the TopicDataType of the type KeylessShapeType defined by the user in the IDL file.
42-
* @ingroup KEYLESSSHAPETYPE
44+
* @ingroup KeylessShapeType
4345
*/
4446
class KeylessShapeTypePubSubType : public eprosima::fastdds::dds::TopicDataType
4547
{
@@ -100,8 +102,10 @@ namespace shapes_demo_typesupport
100102

101103
MD5 m_md5;
102104
unsigned char* m_keyBuffer;
105+
103106
};
104107
}
105108
}
106109

107-
#endif // _FAST_DDS_GENERATED_SHAPES_DEMO_TYPESUPPORT_IDL_KEYLESSSHAPETYPE_PUBSUBTYPES_H_
110+
#endif // _FAST_DDS_GENERATED_SHAPES_DEMO_TYPESUPPORT_IDL_KEYLESSSHAPETYPE_PUBSUBTYPES_H_
111+

types/KeylessShapeTypeTypeObject.cxx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file KeylessShapeTypeTypeObject.cpp
1717
* This source file contains the definition of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool gen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222
#ifdef _WIN32
@@ -26,6 +26,7 @@ namespace { char dummy; }
2626

2727
#include "KeylessShapeType.h"
2828
#include "KeylessShapeTypeTypeObject.h"
29+
#include <mutex>
2930
#include <utility>
3031
#include <sstream>
3132
#include <fastrtps/rtps/common/SerializedPayload.h>
@@ -40,14 +41,18 @@ using namespace eprosima::fastrtps::rtps;
4041

4142
void registerKeylessShapeTypeTypes()
4243
{
43-
TypeObjectFactory *factory = TypeObjectFactory::get_instance();
44-
factory->add_type_object("shapes_demo_typesupport::idl::dds_::KeylessShapeType_", shapes_demo_typesupport::idl::GetKeylessShapeTypeIdentifier(true),
45-
shapes_demo_typesupport::idl::GetKeylessShapeTypeObject(true));
46-
factory->add_type_object("shapes_demo_typesupport::idl::dds_::KeylessShapeType_", shapes_demo_typesupport::idl::GetKeylessShapeTypeIdentifier(false),
47-
shapes_demo_typesupport::idl::GetKeylessShapeTypeObject(false));
44+
static std::once_flag once_flag;
45+
std::call_once(once_flag, []()
46+
{
47+
TypeObjectFactory *factory = TypeObjectFactory::get_instance();
48+
factory->add_type_object("shapes_demo_typesupport::idl::dds_::KeylessShapeType_", shapes_demo_typesupport::idl::GetKeylessShapeTypeIdentifier(true),
49+
shapes_demo_typesupport::idl::GetKeylessShapeTypeObject(true));
50+
factory->add_type_object("shapes_demo_typesupport::idl::dds_::KeylessShapeType_", shapes_demo_typesupport::idl::GetKeylessShapeTypeIdentifier(false),
51+
shapes_demo_typesupport::idl::GetKeylessShapeTypeObject(false));
4852

4953

5054

55+
});
5156
}
5257

5358
namespace shapes_demo_typesupport {

types/KeylessShapeTypeTypeObject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file KeylessShapeTypeTypeObject.h
1717
* This header file contains the declaration of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool gen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222
#ifndef _FAST_DDS_GENERATED_SHAPES_DEMO_TYPESUPPORT_IDL_KEYLESSSHAPETYPE_TYPE_OBJECT_H_

types/Shape.cxx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file Shape.cpp
1717
* This source file contains the definition of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool gen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222
#ifdef _WIN32
@@ -312,3 +312,4 @@ void ShapeType::serializeKey(
312312

313313

314314
}
315+

types/Shape.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file Shape.h
1717
* This header file contains the declaration of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool gen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222
#ifndef _FAST_DDS_GENERATED_SHAPE_H_
@@ -44,16 +44,16 @@
4444

4545
#if defined(_WIN32)
4646
#if defined(EPROSIMA_USER_DLL_EXPORT)
47-
#if defined(Shape_SOURCE)
48-
#define Shape_DllAPI __declspec( dllexport )
47+
#if defined(SHAPE_SOURCE)
48+
#define SHAPE_DllAPI __declspec( dllexport )
4949
#else
50-
#define Shape_DllAPI __declspec( dllimport )
51-
#endif // Shape_SOURCE
50+
#define SHAPE_DllAPI __declspec( dllimport )
51+
#endif // SHAPE_SOURCE
5252
#else
53-
#define Shape_DllAPI
53+
#define SHAPE_DllAPI
5454
#endif // EPROSIMA_USER_DLL_EXPORT
5555
#else
56-
#define Shape_DllAPI
56+
#define SHAPE_DllAPI
5757
#endif // _WIN32
5858

5959
namespace eprosima {
@@ -65,7 +65,7 @@ class Cdr;
6565

6666
/*!
6767
* @brief This class represents the structure ShapeType defined by the user in the IDL file.
68-
* @ingroup SHAPE
68+
* @ingroup Shape
6969
*/
7070
class ShapeType
7171
{
@@ -272,4 +272,5 @@ class ShapeType
272272

273273
};
274274

275-
#endif // _FAST_DDS_GENERATED_SHAPE_H_
275+
#endif // _FAST_DDS_GENERATED_SHAPE_H_
276+

types/ShapePubSubTypes.cxx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file ShapePubSubTypes.cpp
1717
* This header file contains the implementation of the serialization functions.
1818
*
19-
* This file was generated by the tool fastcdrgen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222

@@ -60,15 +60,15 @@ bool ShapeTypePubSubType::serialize(
6060
// Object that serializes the data.
6161
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::DEFAULT_ENDIAN, eprosima::fastcdr::Cdr::DDS_CDR);
6262
payload->encapsulation = ser.endianness() == eprosima::fastcdr::Cdr::BIG_ENDIANNESS ? CDR_BE : CDR_LE;
63-
// Serialize encapsulation
64-
ser.serialize_encapsulation();
6563

6664
try
6765
{
66+
// Serialize encapsulation
67+
ser.serialize_encapsulation();
6868
// Serialize the object.
6969
p_type->serialize(ser);
7070
}
71-
catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/)
71+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
7272
{
7373
return false;
7474
}
@@ -84,7 +84,7 @@ bool ShapeTypePubSubType::deserialize(
8484
{
8585
try
8686
{
87-
//Convert DATA to pointer of your type
87+
// Convert DATA to pointer of your type
8888
ShapeType* p_type = static_cast<ShapeType*>(data);
8989

9090
// Object that manages the raw buffer.
@@ -100,7 +100,7 @@ bool ShapeTypePubSubType::deserialize(
100100
// Deserialize the object.
101101
p_type->deserialize(deser);
102102
}
103-
catch (eprosima::fastcdr::exception::NotEnoughMemoryException& /*exception*/)
103+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
104104
{
105105
return false;
106106
}

types/ShapePubSubTypes.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file ShapePubSubTypes.h
1717
* This header file contains the declaration of the serialization functions.
1818
*
19-
* This file was generated by the tool fastcdrgen.
19+
* This file was generated by the tool fastddsgen (version: 2.5.3).
2020
*/
2121

2222

@@ -28,14 +28,16 @@
2828

2929
#include "Shape.h"
3030

31+
3132
#if !defined(GEN_API_VER) || (GEN_API_VER != 1)
3233
#error \
3334
Generated Shape is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
3435
#endif // GEN_API_VER
3536

37+
3638
/*!
3739
* @brief This class represents the TopicDataType of the type ShapeType defined by the user in the IDL file.
38-
* @ingroup SHAPE
40+
* @ingroup Shape
3941
*/
4042
class ShapeTypePubSubType : public eprosima::fastdds::dds::TopicDataType
4143
{
@@ -96,6 +98,8 @@ class ShapeTypePubSubType : public eprosima::fastdds::dds::TopicDataType
9698

9799
MD5 m_md5;
98100
unsigned char* m_keyBuffer;
101+
99102
};
100103

101-
#endif // _FAST_DDS_GENERATED_SHAPE_PUBSUBTYPES_H_
104+
#endif // _FAST_DDS_GENERATED_SHAPE_PUBSUBTYPES_H_
105+

0 commit comments

Comments
 (0)