Skip to content

Commit

Permalink
Refs #21184: Change DynamicTypeBuilder type in get_dynamic_type_build…
Browse files Browse the repository at this point in the history
…er_from_xml_by_name() after refactor

Signed-off-by: elianalf <62831776+elianalf@users.noreply.github.com>
  • Loading branch information
elianalf committed Jun 19, 2024
1 parent b5c042f commit 3555f92
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1886,11 +1886,11 @@ void dds_topic_examples()
DomainParticipantFactory::get_instance()->load_XML_profiles_file("example_type.xml");

// Retrieve the an instance of the desired type
DynamicType::_ref_type dyn_type;
DomainParticipantFactory::get_instance()->get_dynamic_type_builder_from_xml_by_name("DynamicType", dyn_type);
DynamicTypeBuilder::_ref_type dyn_type_builder;
DomainParticipantFactory::get_instance()->get_dynamic_type_builder_from_xml_by_name("DynamicType", dyn_type_builder);

// Register dynamic type
TypeSupport dyn_type_support(new DynamicPubSubType(dyn_type));
TypeSupport dyn_type_support(new DynamicPubSubType(dyn_type_builder->build()));
dyn_type_support.register_type(participant, nullptr);

// Create a Topic with the registered type.
Expand Down Expand Up @@ -5509,7 +5509,7 @@ void xml_profiles_examples()
DomainParticipantFactory::get_instance()->load_XML_profiles_file("my_profiles.xml"))
{
// Retrieve instance of the desired type
DynamicType::_ref_type my_struct_type;
DynamicTypeBuilder::_ref_type my_struct_type;
if (RETCODE_OK !=
DomainParticipantFactory::get_instance()->get_dynamic_type_builder_from_xml_by_name(
"MyStruct", my_struct_type))
Expand All @@ -5519,7 +5519,7 @@ void xml_profiles_examples()
}

// Register MyStruct type
TypeSupport my_struct_type_support(new DynamicPubSubType(my_struct_type));
TypeSupport my_struct_type_support(new DynamicPubSubType(my_struct_type->build()));
my_struct_type_support.register_type(participant, nullptr);
}
else
Expand Down

0 comments on commit 3555f92

Please sign in to comment.