Definition at line 132 of file Graph.h. References mNodes. Referenced by RemoveNode(). 00133 { 00134 if (idx < 0 || idx >= mNodes.size()) 00135 return; 00136 Node* node = mNodes[idx].nodeVector[0]; 00137 for (int i=0; i<mNodes.size(); i++) 00138 { 00139 NodeVector& nodeVector = mNodes[i].nodeVector; 00140 for (int j=nodeVector.size()-1; j>=0; j--) 00141 if (nodeVector[j] == node) 00142 nodeVector.erase(nodeVector.begin()+j); 00143 } 00144 mNodes.erase(mNodes.begin()+idx); 00145 // RvB: Maybe change interface so that we do not simply add nodes 00146 // but we add OglGui::window or OglGui::View derived objects. 00147 // Than destruction is possible and safe. 00148 // delete (OglGui::Window*) node; 00149 }
|