Skip to content

Commit

Permalink
TypeObjectRegistry refactor (#139)
Browse files Browse the repository at this point in the history
* Refs #21045. Regenerated idl files

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #21045. Regenerated idl files

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
richiware authored Jun 14, 2024
1 parent 38a1890 commit 7c43098
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 460 deletions.
4 changes: 2 additions & 2 deletions types/KeylessShapeTypePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ namespace shapes_demo_typesupport {
return true;
}

void KeylessShapeTypePubSubType::register_type_object_representation() const
void KeylessShapeTypePubSubType::register_type_object_representation()
{
register_KeylessShapeType_type_objects();
register_KeylessShapeType_type_identifier(type_identifiers_);
}

} // namespace idl
Expand Down
2 changes: 1 addition & 1 deletion types/KeylessShapeTypePubSubTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace shapes_demo_typesupport
void* data) override;

//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() const override;
eProsima_user_DllExport void register_type_object_representation() override;

#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
Expand Down
272 changes: 51 additions & 221 deletions types/KeylessShapeTypeTypeObjectSupport.cxx

Large diffs are not rendered by default.

11 changes: 3 additions & 8 deletions types/KeylessShapeTypeTypeObjectSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,12 @@
#define eProsima_user_DllExport
#endif // _WIN32

/**
* @brief Register every TypeObject representation defined in the IDL file in Fast DDS TypeObjectRegistry.
*/
eProsima_user_DllExport void register_KeylessShapeType_type_objects();

#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

namespace shapes_demo_typesupport {
namespace idl {
/**
* @brief Register shapes_demo_typesupport_idl_KeylessShapeType related TypeIdentifier.
* @brief Register KeylessShapeType related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
* Hash TypeIdentifiers require to fill the TypeObject information and hash it, consequently, the TypeObject is
* indirectly registered as well.
Expand All @@ -54,8 +49,8 @@ namespace idl {
* The returned TypeIdentifier corresponds to the complete TypeIdentifier in case of hashed TypeIdentifiers.
* Invalid TypeIdentifier is returned in case of error.
*/
eProsima_user_DllExport void register_shapes_demo_typesupport_idl_KeylessShapeType_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifier& type_id);
eProsima_user_DllExport void register_KeylessShapeType_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);

} // namespace idl

Expand Down
4 changes: 2 additions & 2 deletions types/ShapePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ bool ShapeTypePubSubType::getKey(
return true;
}

void ShapeTypePubSubType::register_type_object_representation() const
void ShapeTypePubSubType::register_type_object_representation()
{
register_Shape_type_objects();
register_ShapeType_type_identifier(type_identifiers_);
}


Expand Down
2 changes: 1 addition & 1 deletion types/ShapePubSubTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class ShapeTypePubSubType : public eprosima::fastdds::dds::TopicDataType
void* data) override;

//Register TypeObject representation in Fast DDS TypeObjectRegistry
eProsima_user_DllExport void register_type_object_representation() const override;
eProsima_user_DllExport void register_type_object_representation() override;

#ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
eProsima_user_DllExport inline bool is_bounded() const override
Expand Down
268 changes: 49 additions & 219 deletions types/ShapeTypeObjectSupport.cxx

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions types/ShapeTypeObjectSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
#define eProsima_user_DllExport
#endif // _WIN32

/**
* @brief Register every TypeObject representation defined in the IDL file in Fast DDS TypeObjectRegistry.
*/
eProsima_user_DllExport void register_Shape_type_objects();

#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

/**
Expand All @@ -53,7 +48,7 @@ eProsima_user_DllExport void register_Shape_type_objects();
* Invalid TypeIdentifier is returned in case of error.
*/
eProsima_user_DllExport void register_ShapeType_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifier& type_id);
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down

0 comments on commit 7c43098

Please sign in to comment.