model_server/edge/src/aset_graph.cxx
// Creates EDGE edge node(s) out of view connector. Multiple
// node view connectors are split into simple two node
// EDGE connectors. Each EDGE connector gets an index corresponding
// to the view input[] or output[] node. If view connector has both
// multiple inputs and outputs then an EDGE dummy node of a special
// DUMMYCONNECT_POINT type is created and connected with all 
// inputs and outputs. 
Creates EDGE edge node(s) out of view connector. Multiple
node view connectors are split into simple two node
EDGE connectors. Each EDGE connector gets an index corresponding
to the view input[] or output[] node. If view connector has both
multiple inputs and outputs then an EDGE dummy node of a special
DUMMYCONNECT_POINT type is created and connected with all
inputs and outputs.
Creates EDGE edge node ( s ) out of view connector . Multiple node view connectors are split into simple two node EDGE connectors . Each EDGE connector gets an index corresponding to the view input [] or output [] node . If view connector has both multiple inputs and outputs then an EDGE dummy node of a special DUMMYCONNECT_POINT type is created and connected with all inputs and outputs .
void edge_create_connector(aset_graph *graph_node,
                            viewConnectionNodePtr view_conn)
{
    aset_node        *dummy_node;   
    aset_node        *src_node;
    aset_node        *targ_node;
    objArrPtr        view_inputs;           
    objArrPtr        view_outputs;           
    Obj              *el1;
    Obj              *el2;
    int              ind;
    int              v_level;
    int              x_space;
    Initialize(edge_create_connector);
    view_inputs = view_conn->get_inputs();
    view_outputs = view_conn->get_outputs();
    if (view_inputs->size() == 0 || view_outputs->size() == 0)
       return;
    dummy_node = NULL;
    if ( view_inputs->size() > 1 && view_outputs->size() > 1 ){
        dummy_node = edge_create_node(graph_node, 
                                      checked_cast(viewSymbolNode, NULL));
        dummy_node->dummy_type = DUMMY_CONNECT_POINT;
        v_level = (checked_cast(viewSymbolNode, (*view_outputs)[0]))->get_graphlevel();
        dummy_node->setlevel(v_level);
        x_space = - graph_node->getxspace(); 
        dummy_node->setwidth(x_space);
    }
    if ( view_inputs->size() > 1 ){
        if (dummy_node == NULL){
            if (viewnode_is_hidden (checked_cast(viewSymbolNode, 
                 (*view_outputs)[0])))
                  return;             
            targ_node = edge_get_view_ptr(graph_node, 
                        checked_cast(viewSymbolNode, (*view_outputs)[0]));
        }
        else
            targ_node = dummy_node;
        ind = 0;
        ForEach(el1, *view_inputs){
            if (viewnode_is_hidden (checked_cast(viewSymbolNode, el1)))
                  continue;             
            src_node = edge_get_view_ptr(graph_node,
                                       checked_cast(viewSymbolNode, el1));
            edge_simple_connector(graph_node, view_conn, src_node,
                                  targ_node, ind);
            ind ++;
        }
        if ( view_outputs->size() == 1 )
            return;                       
    }
    if (dummy_node == NULL){
        if (viewnode_is_hidden (checked_cast(viewSymbolNode,
              (*view_inputs)[0])))
            return;
        src_node = edge_get_view_ptr(graph_node, 
                        checked_cast(viewSymbolNode, (*view_inputs)[0] ));
    }
    else
        src_node = dummy_node;
    if ( view_outputs->size() == 1 &&
         ! view_conn->viewIsA(viewERDConnectorType) )
        ind = -1;               
    else
        ind = 0;
    ForEach(el2, *view_outputs){
        if (viewnode_is_hidden (checked_cast(viewSymbolNode, el2)))
                  continue;           
        targ_node = edge_get_view_ptr(graph_node,
                                        checked_cast(viewSymbolNode, el2));
        edge_simple_connector(graph_node, view_conn, src_node,
                              targ_node, ind);
        ind ++;
    }
    Return
}
void edge_create_connector ( aset_graph * graph_node , viewConnectionNodePtr view_conn ) { aset_node * dummy_node ; aset_node * src_node ; aset_node * targ_node ; objArrPtr view_inputs ; objArrPtr view_outputs ; Obj * el1 ; Obj * el2 ; int ind ; int v_level ; int x_space ; Initialize ( edge_create_connector ) ; view_inputs = view_conn -> get_inputs ( ) ; view_outputs = view_conn -> get_outputs ( ) ; if ( view_inputs -> size ( ) == 0 || view_outputs -> size ( ) == 0 ) return ; dummy_node = NULL ; if ( view_inputs -> size ( ) > 1 && view_outputs -> size ( ) > 1 ) { dummy_node = edge_create_node ( graph_node , checked_cast ( viewSymbolNode , NULL ) ) ; dummy_node -> dummy_type = DUMMY_CONNECT_POINT ; v_level = ( checked_cast ( viewSymbolNode , ( * view_outputs ) [ 0 ] ) ) -> get_graphlevel ( ) ; dummy_node -> setlevel ( v_level ) ; x_space = - graph_node -> getxspace ( ) ; dummy_node -> setwidth ( x_space ) ; } if ( view_inputs -> size ( ) > 1 ) { if ( dummy_node == NULL ) { if ( viewnode_is_hidden ( checked_cast ( viewSymbolNode , ( * view_outputs ) [ 0 ] ) ) ) return ; targ_node = edge_get_view_ptr ( graph_node , checked_cast ( viewSymbolNode , ( * view_outputs ) [ 0 ] ) ) ; } else targ_node = dummy_node ; ind = 0 ; ForEach ( el1 , * view_inputs ) { if ( viewnode_is_hidden ( checked_cast ( viewSymbolNode , el1 ) ) ) continue ; src_node = edge_get_view_ptr ( graph_node , checked_cast ( viewSymbolNode , el1 ) ) ; edge_simple_connector ( graph_node , view_conn , src_node , targ_node , ind ) ; ind ++ ; } if ( view_outputs -> size ( ) == 1 ) return ; } if ( dummy_node == NULL ) { if ( viewnode_is_hidden ( checked_cast ( viewSymbolNode , ( * view_inputs ) [ 0 ] ) ) ) return ; src_node = edge_get_view_ptr ( graph_node , checked_cast ( viewSymbolNode , ( * view_inputs ) [ 0 ] ) ) ; } else src_node = dummy_node ; if ( view_outputs -> size ( ) == 1 && ! view_conn -> viewIsA ( viewERDConnectorType ) ) ind = -1 ; else ind = 0 ; ForEach ( el2 , * view_outputs ) { if ( viewnode_is_hidden ( checked_cast ( viewSymbolNode , el2 ) ) ) continue ; targ_node = edge_get_view_ptr ( graph_node , checked_cast ( viewSymbolNode , el2 ) ) ; edge_simple_connector ( graph_node , view_conn , src_node , targ_node , ind ) ; ind ++ ; } Return }
Creates EDGE edge node(s) out of view connector.
Creates EDGE edge node ( s ) out of view connector .
// created for multiple node // connector //--------- Executable Code ------------------------------ //  get input and output nodes of connector //      both inputs and outputs are multiple nodes; create a dummy //      but not EDGE dummy kind //      dummy nodes have NEGATIVE length not to take space //  process multiple input nodes // target collapsed // destination collapsed // all done //  process output nodes (simple edge case included) // simple connector /*
      switch direction of the connector for upper tree
   
        if ( targ_node->getlevel() >= 0 )
            edge_simple_connector(graph_node, view_conn, src_node,
                              targ_node, ind);
        else
            edge_simple_connector(graph_node, view_conn, targ_node,
                              src_node, ind);
*/