MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / clone

Method clone

dds/DCPS/XTypes/DynamicDataBase.cpp:462–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460}
461
462DDS::DynamicData_ptr DynamicDataBase::clone()
463{
464 DDS::DynamicData_var new_copy = DDS::DynamicDataFactory::get_instance()->create_data(type_);
465 if (!new_copy || copy(new_copy, this) != DDS::RETCODE_OK) {
466 if (log_level >= LogLevel::Notice) {
467 ACE_ERROR((LM_NOTICE, "(%P|%t) NOTICE: DynamicDataBase::clone: Failed to create a copy\n"));
468 }
469 return 0;
470 }
471 return new_copy._retn();
472}
473
474namespace {
475 DDS::ReturnCode_t invalid_cast(const char* method, TypeKind to, TypeKind from)

Callers

nothing calls this directly

Calls 3

create_dataMethod · 0.80
copyFunction · 0.70
_retnMethod · 0.45

Tested by

no test coverage detected