newntui/discovermdi/src/disgraphnode.cpp
//------------------------------------------------------------------------------------
// This function will remove all outgoing edges with relation type
// "relationID"
//------------------------------------------------------------------------------------
This function will remove all outgoing edges with relation type
"relationID"
This function will remove all outgoing edges with relation type " relationID "
void CDisGraphNode::RemoveRelations(int relationID) {
TSDListIterator* edgeIterator=new TSDListIterator(pOutEdgeDList());
CDisGraphEdge* pEdge;
    while(*edgeIterator)  {
		pEdge = (CDisGraphEdge *) edgeIterator->pObject();
		if(pEdge->GetRelationID()==relationID) {
			m_ParentGraph->removeEdge(pEdge);
			delete edgeIterator;
            edgeIterator=new TSDListIterator(pOutEdgeDList());
			continue;
		}		
		(*edgeIterator)++;
	}
	delete edgeIterator;
}
void CDisGraphNode :: RemoveRelations ( int relationID ) { TSDListIterator * edgeIterator = new TSDListIterator ( pOutEdgeDList ( ) ) ; CDisGraphEdge * pEdge ; while ( * edgeIterator ) { pEdge = ( CDisGraphEdge * ) edgeIterator -> pObject ( ) ; if ( pEdge -> GetRelationID ( ) == relationID ) { m_ParentGraph -> removeEdge ( pEdge ) ; delete edgeIterator ; edgeIterator = new TSDListIterator ( pOutEdgeDList ( ) ) ; continue ; } ( * edgeIterator ) ++ ; } delete edgeIterator ; }
This function will remove all outgoing edges with relation type
"relationID"
This function will remove all outgoing edges with relation type " relationID "
// We do not need re-referencing because we'v delete objects without server // global array elements