newntui/discovermdi/src/disgraphnode.cpp
//------------------------------------------------------------------------------------
// This function will inspect all visible and hidden nodes and will try to create
// relation edges with relations described in "name".
//------------------------------------------------------------------------------------
This function will inspect all visible and hidden nodes and will try to create
relation edges with relations described in "name".
This function will inspect all visible and hidden nodes and will try to create relation edges with relations described in " name " .
void CDisGraph::CreateRelation(int id,
							   CEdgeProperties* unselected, 
							   CEdgeProperties* selected,
							   CEdgeProperties* focused) {
CDisGraphNode* pNode;
CString relationType;
CString cmd;
    relationType.LoadString(id);
	TSDListIterator nodeIterator(pNodeDList());
    while(nodeIterator)  {
		pNode = (CDisGraphNode *) nodeIterator.pObject();
		cmd.Format("%s %d \"%s\"",m_RelationsScript,pNode->GetNodeID(),relationType);
		pNode->CreateRelations(cmd,id,unselected,selected,focused);
		nodeIterator++;
	}
    TSDListIterator hideIterator(pHideDigraph()->pNodeDList());
    while(hideIterator)  {
		pNode = (CDisGraphNode *) hideIterator.pObject();
		cmd.Format("%s %d \"%s\"",m_RelationsScript,pNode->GetNodeID(),relationType);
		pNode->CreateRelations(cmd,id,unselected,selected,focused);
		hideIterator++;
	}
}
void CDisGraph :: CreateRelation ( int id , CEdgeProperties * unselected , CEdgeProperties * selected , CEdgeProperties * focused ) { CDisGraphNode * pNode ; CString relationType ; CString cmd ; relationType . LoadString ( id ) ; TSDListIterator nodeIterator ( pNodeDList ( ) ) ; while ( nodeIterator ) { pNode = ( CDisGraphNode * ) nodeIterator . pObject ( ) ; cmd . Format ( " \" \" " , m_RelationsScript , pNode -> GetNodeID ( ) , relationType ) ; pNode -> CreateRelations ( cmd , id , unselected , selected , focused ) ; nodeIterator ++ ; } TSDListIterator hideIterator ( pHideDigraph ( ) -> pNodeDList ( ) ) ; while ( hideIterator ) { pNode = ( CDisGraphNode * ) hideIterator . pObject ( ) ; cmd . Format ( " \" \" " , m_RelationsScript , pNode -> GetNodeID ( ) , relationType ) ; pNode -> CreateRelations ( cmd , id , unselected , selected , focused ) ; hideIterator ++ ; } }
This function will inspect all visible and hidden nodes and will try to create
relation edges with relations described in "name".
This function will inspect all visible and hidden nodes and will try to create relation edges with relations described in " name " .
// Refreshing all visible nodes // Refreshing all invisible nodes