newntui/discovermdi/src/disgraphnode.cpp
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++) {
	   // Inserting child nodes into the graph
	   CDisGraphNode* pNode;
	   pNode = (CDisGraphNode *) addNode();

       pNode->SetNode(nodeIDs[i],           // entity index in the server array
			          accessChildrenCreator,// script to create childs
                      accessParentsCreator, // script to create parents
				      accessFieldsCreator,  // script to create fields
				      accessNodeName,       // script to extract name
				      accessFieldName,      // script to extract field name
				      accessNodeImage,      // script to extract image
					  accessFieldImage,     // script to extract field image
				      accessTestChildren,   // script to test if has children
					  accessTestParents,    // script to test if has parents
					  nodeUnselected,       // unselected style
			          nodeSelected,         // selected style
					  nodeFocused,          // focused style
					  edgeUnselected,       // unselected style
			          edgeSelected,         // selected style
					  edgeFocused );        // focused style



	   pNode->ExtractFields();
	   pNode->ExtractName();
       pNode->ExtractNodeKind();
	   pNode->ExtractParentChildEnable();
//	   pNode->CreateChildNodes();
   }
  // removing new nodes IDs array created by ParseCreationResults
  delete nodeIDs;

}
//------------------------------------------------------------------------------------
// 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