newntui/discovermdi/src/disgraphnode.cpp
//------------------------------------------------------------------------------------
// We will use this method to pass browser selection into the graph. It will call
// selection script which is passed into this function in the "selProc" string and
// it will create the unconnected nodes in the graph. It will also call 
// "CreateChildNodes" on the selected nodes to expand them one level.
//------------------------------------------------------------------------------------
We will use this method to pass browser selection into the graph. It will call
selection script which is passed into this function in the "selProc" string and
it will create the unconnected nodes in the graph. It will also call
"CreateChildNodes" on the selected nodes to expand them one level.
We will use this method to pass browser selection into the graph . It will call selection script which is passed into this function in the " selProc " string and it will create the unconnected nodes in the graph . It will also call " CreateChildNodes " on the selected nodes to expand them one level .
void CDisGraph::CreateGraph(CString& selProc,
							CString& accessChildrenCreator,
							CString& accessParentsCreator,
					        CString& accessFieldsCreator,
	                        CString& accessNodeName,
					        CString& accessFieldName,
					        CString& accessNodeImage,
					        CString& accessFieldImage,
                            CString& accessTestChildren,        
                            CString& accessTestParents,     
					        CNodeProperties* nodeUnselected,
					        CNodeProperties* nodeSelected,
					        CNodeProperties* nodeFocused,
		                    CEdgeProperties* edgeUnselected,
					        CEdgeProperties* edgeSelected,
					        CEdgeProperties* edgeFocused) {
CString result;
int* nodeIDs;
   result = Evaluate(selProc);
   int nodesAmount = ParseCreationResults(result,&nodeIDs);
   if(nodesAmount==0) return;
   for(register i=0;i<nodesAmount;i++) {
	   CDisGraphNode* pNode;
	   pNode = (CDisGraphNode *) addNode();
       pNode->SetNode(nodeIDs[i],           
			          accessChildrenCreator,
                      accessParentsCreator, 
				      accessFieldsCreator,  
				      accessNodeName,       
				      accessFieldName,      
				      accessNodeImage,      
					  accessFieldImage,     
				      accessTestChildren,   
					  accessTestParents,    
					  nodeUnselected,       
			          nodeSelected,         
					  nodeFocused,          
					  edgeUnselected,       
			          edgeSelected,         
					  edgeFocused );        
	   pNode->ExtractFields();
	   pNode->ExtractName();
       pNode->ExtractNodeKind();
	   pNode->ExtractParentChildEnable();
   }
  delete nodeIDs;
}
void CDisGraph :: CreateGraph ( CString & selProc , CString & accessChildrenCreator , CString & accessParentsCreator , CString & accessFieldsCreator , CString & accessNodeName , CString & accessFieldName , CString & accessNodeImage , CString & accessFieldImage , CString & accessTestChildren , CString & accessTestParents , CNodeProperties * nodeUnselected , CNodeProperties * nodeSelected , CNodeProperties * nodeFocused , CEdgeProperties * edgeUnselected , CEdgeProperties * edgeSelected , CEdgeProperties * edgeFocused ) { CString result ; int * nodeIDs ; result = Evaluate ( selProc ) ; int nodesAmount = ParseCreationResults ( result , & nodeIDs ) ; if ( nodesAmount == 0 ) return ; for ( register i = 0 ; i < nodesAmount ; i ++ ) { CDisGraphNode * pNode ; pNode = ( CDisGraphNode * ) addNode ( ) ; pNode -> SetNode ( nodeIDs [ i ] , accessChildrenCreator , accessParentsCreator , accessFieldsCreator , accessNodeName , accessFieldName , accessNodeImage , accessFieldImage , accessTestChildren , accessTestParents , nodeUnselected , nodeSelected , nodeFocused , edgeUnselected , edgeSelected , edgeFocused ) ; pNode -> ExtractFields ( ) ; pNode -> ExtractName ( ) ; pNode -> ExtractNodeKind ( ) ; pNode -> ExtractParentChildEnable ( ) ; } delete nodeIDs ; }
We will use this method to pass browser selection into the graph.
We will use this method to pass browser selection into the graph .
// Inserting child nodes into the graph // entity index in the server array // script to create childs // script to create parents // script to create fields // script to extract name // script to extract field name // script to extract image // script to extract field image // script to test if has children // script to test if has parents // unselected style // selected style // focused style // unselected style // selected style // focused style //	   pNode->CreateChildNodes(); // removing new nodes IDs array created by ParseCreationResults