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

Method remove_topic_reference

dds/InfoRepo/DCPS_IR_Participant.cpp:444–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444int DCPS_IR_Participant::remove_topic_reference(OpenDDS::DCPS::GUID_t topicId,
445 DCPS_IR_Topic*& topic)
446{
447 DCPS_IR_Topic_Map::iterator where = this->topicRefs_.find(topicId);
448
449 if (where != this->topicRefs_.end()) {
450 topic = where->second;
451 this->topicRefs_.erase(where);
452
453 if (OpenDDS::DCPS::DCPS_debug_level > 0) {
454 OpenDDS::DCPS::RepoIdConverter part_converter(id_);
455 OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
456 ACE_DEBUG((LM_DEBUG,
457 ACE_TEXT("(%P|%t) DCPS_IR_Participant::remove_topic_reference: ")
458 ACE_TEXT("participant %C removed topic %C at 0x%x.\n"),
459 std::string(part_converter).c_str(),
460 std::string(topic_converter).c_str(),
461 topic));
462 }
463
464 return 0;
465
466 } else {
467 if (OpenDDS::DCPS::DCPS_debug_level > 0) {
468 OpenDDS::DCPS::RepoIdConverter part_converter(id_);
469 OpenDDS::DCPS::RepoIdConverter topic_converter(topicId);
470 ACE_ERROR((LM_WARNING,
471 ACE_TEXT("(%P|%t) WARNING: DCPS_IR_Participant::remove_topic_reference: ")
472 ACE_TEXT("participant %C unable to find topic %C for removal.\n"),
473 std::string(part_converter).c_str(),
474 std::string(topic_converter).c_str()));
475 }
476
477 return -1;
478 }
479}
480
481int DCPS_IR_Participant::find_topic_reference(OpenDDS::DCPS::GUID_t topicId,
482 DCPS_IR_Topic*& topic)

Callers 2

remove_by_ownerMethod · 0.80
remove_topicMethod · 0.80

Calls 3

findMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected