Skip to content

Commit

Permalink
Adjust type in get_dynamic_type_builder_from_xml_by_name to return Dy…
Browse files Browse the repository at this point in the history
…namicTypeBuilder (#818)

Signed-off-by: elianalf <[email protected]>
  • Loading branch information
elianalf authored Jul 3, 2024
1 parent 5b29157 commit 758dba8
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 @@ -1879,11 +1879,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 @@ -5667,7 +5667,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 @@ -5677,7 +5677,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 758dba8

Please sign in to comment.