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

Method deleteProcessNode

tools/monitor/MonitorDataStorage.cpp:673–701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

671}
672
673void
674Monitor::MonitorDataStorage::deleteProcessNode( TreeNode* node)
675{
676 std::pair< bool, ProcessToTreeMap::key_type> pResult
677 = this->findKey( this->processToTreeMap_, node);
678 if( pResult.first) {
679 this->processToTreeMap_.erase( pResult.second);
680 }
681
682 // Remove the process from the host.
683 TreeNode* hostNode = node->parent();
684 hostNode->removeChildren( node->row(), 1);
685
686 // Check and remove the host node if there are no pid nodes remaining
687 // after the removal (no children).
688 if( hostNode->size() == 0) {
689 std::pair< bool, HostToTreeMap::key_type> hResult
690 = this->findKey( this->hostToTreeMap_, hostNode);
691 if( hResult.first) {
692 this->hostToTreeMap_.erase( hResult.second);
693 }
694 delete hostNode;
695 }
696
697 delete node;
698
699 // Notify the GUI to update.
700 this->model_->changed();
701}
702
703void
704Monitor::MonitorDataStorage::displayNvp(

Callers

nothing calls this directly

Calls 6

removeChildrenMethod · 0.80
rowMethod · 0.80
eraseMethod · 0.45
parentMethod · 0.45
sizeMethod · 0.45
changedMethod · 0.45

Tested by

no test coverage detected