newntui/discovermdi/src/disgraphnode.cpp
//------------------------------------------------------------------------------------
// Will run the extract fields script, will parse the results and
// will fill the items list with the resulted indexes. It will use
// field name extraction and field image extraction scripts to assing
// the name and image to the item.
//------------------------------------------------------------------------------------
Will run the extract fields script, will parse the results and
will fill the items list with the resulted indexes. It will use
field name extraction and field image extraction scripts to assing
the name and image to the item.
Will run the extract fields script will parse the results and will fill the items list with the resulted indexes . It will use field name extraction and field image extraction scripts to assing the name and image to the item .
void CDisGraphNode::ExtractFields(void) {
register i;
CString command;
CString result;
int* fieldIDs;
   m_FieldsList.RemoveAll();
   command.Format("%s %u",m_FieldsCreator, m_NodeID);
   result = m_ParentGraph->Evaluate(command);
   int nodesAmount = m_ParentGraph->ParseFieldResults(result,&fieldIDs);
   if(nodesAmount==0) return;
   for(i=0;i<nodesAmount;i++) {
	   CNodeItem item;
	   item.m_FieldID=fieldIDs[i];
       command.Format("%s %u",m_FieldNameExtractor,fieldIDs[i]);
	   result = m_ParentGraph->Evaluate(command);
	   item.m_FieldName=result;
       command.Format("%s %u",m_FieldImageExtractor,fieldIDs[i]);
	   result = m_ParentGraph->Evaluate(command);
	   item.m_FieldType=atoi(result);
	   m_FieldsList.AddTail(item);
   }
   delete fieldIDs;
}
void CDisGraphNode :: ExtractFields ( void ) { register i ; CString command ; CString result ; int * fieldIDs ; m_FieldsList . RemoveAll ( ) ; command . Format ( " " , m_FieldsCreator , m_NodeID ) ; result = m_ParentGraph -> Evaluate ( command ) ; int nodesAmount = m_ParentGraph -> ParseFieldResults ( result , & fieldIDs ) ; if ( nodesAmount == 0 ) return ; for ( i = 0 ; i < nodesAmount ; i ++ ) { CNodeItem item ; item . m_FieldID = fieldIDs [ i ] ; command . Format ( " " , m_FieldNameExtractor , fieldIDs [ i ] ) ; result = m_ParentGraph -> Evaluate ( command ) ; item . m_FieldName = result ; command . Format ( " " , m_FieldImageExtractor , fieldIDs [ i ] ) ; result = m_ParentGraph -> Evaluate ( command ) ; item . m_FieldType = atoi ( result ) ; m_FieldsList . AddTail ( item ) ; } delete fieldIDs ; }
Will run the extract fields script, will parse the results and
will fill the items list with the resulted indexes.
Will run the extract fields script will parse the results and will fill the items list with the resulted indexes .
// This script will create additional entities in the server // Inserting child nodes into the graph // Assigning ID to the node // Extracting the field name // Extracting the field image index