Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeObjectRegistry refactor [21134] #132

Merged
merged 2 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions fastdds_python/test/types/test_completePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ bool StructTypePubSubType::getKey(
return true;
}

void StructTypePubSubType::register_type_object_representation() const
void StructTypePubSubType::register_type_object_representation()
{
register_test_complete_type_objects();
register_StructType_type_identifier(type_identifiers_);
}


Expand Down Expand Up @@ -414,9 +414,9 @@ bool CompleteTestTypePubSubType::getKey(
return true;
}

void CompleteTestTypePubSubType::register_type_object_representation() const
void CompleteTestTypePubSubType::register_type_object_representation()
{
register_test_complete_type_objects();
register_CompleteTestType_type_identifier(type_identifiers_);
}

KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType()
Expand Down Expand Up @@ -607,9 +607,9 @@ bool KeyedCompleteTestTypePubSubType::getKey(
return true;
}

void KeyedCompleteTestTypePubSubType::register_type_object_representation() const
void KeyedCompleteTestTypePubSubType::register_type_object_representation()
{
register_test_complete_type_objects();
register_KeyedCompleteTestType_type_identifier(type_identifiers_);
}


Expand Down
6 changes: 3 additions & 3 deletions fastdds_python/test/types/test_completePubSubTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class StructTypePubSubType : 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 Expand Up @@ -183,7 +183,7 @@ class CompleteTestTypePubSubType : 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 Expand Up @@ -274,7 +274,7 @@ class KeyedCompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicData
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
40,639 changes: 2,629 additions & 38,010 deletions fastdds_python/test/types/test_completeTypeObjectSupport.cxx

Large diffs are not rendered by default.

35 changes: 27 additions & 8 deletions fastdds_python/test/types/test_completeTypeObjectSupport.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,32 @@
#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_test_complete_type_objects();

#ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC

/**
* @brief Register Color 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.
*
* @param[out] TypeIdentifier of the registered type.
* 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_Color_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register Material 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.
*
* @param[out] TypeIdentifier of the registered type.
* 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_Material_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register StructType related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
Expand All @@ -54,7 +73,7 @@ eProsima_user_DllExport void register_test_complete_type_objects();
* Invalid TypeIdentifier is returned in case of error.
*/
eProsima_user_DllExport void register_StructType_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifier& type_id);
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register CompleteTestType related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
Expand All @@ -66,7 +85,7 @@ eProsima_user_DllExport void register_StructType_type_identifier(
* Invalid TypeIdentifier is returned in case of error.
*/
eProsima_user_DllExport void register_CompleteTestType_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifier& type_id);
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);
/**
* @brief Register KeyedCompleteTestType related TypeIdentifier.
* Fully-descriptive TypeIdentifiers are directly registered.
Expand All @@ -78,7 +97,7 @@ eProsima_user_DllExport void register_CompleteTestType_type_identifier(
* Invalid TypeIdentifier is returned in case of error.
*/
eProsima_user_DllExport void register_KeyedCompleteTestType_type_identifier(
eprosima::fastdds::dds::xtypes::TypeIdentifier& type_id);
eprosima::fastdds::dds::xtypes::TypeIdentifierPair& type_ids);


#endif // DOXYGEN_SHOULD_SKIP_THIS_PUBLIC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ namespace eprosima {
return true;
}

void StructType2PubSubType::register_type_object_representation() const
void StructType2PubSubType::register_type_object_representation()
{
register_test_included_modules_type_objects();
register_StructType2_type_identifier(type_identifiers_);
}

} // namespace test2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ namespace eprosima
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
Loading