model_server/edge/src/aset_graph.cxx
//  input view node comes either as a single root or as an array
//  of view nodes
input view node comes either as a single root or as an array
of view nodes
input view node comes either as a single root or as an array of view nodes
aset_graph::aset_graph( viewNodePtr root, int x_space, int y_space,
                        objArrPtr root_arr, int uu)
                      : graph((char *) NULL)
{
    Initialize(aset_graph::aset_graph);
    viewSymbolNodePtr top_view;
    viewGraHeaderPtr local_view;
    int        screen_width, screen_height;
    dialogPtr  dlg = NULL;
    up_tree     = uu;
    int no_view = 0;
    if (root_arr == NULL)
        top_view = checked_cast(viewSymbolNode,root->get_first());
    else
        top_view = checked_cast(viewSymbolNode, (*root_arr)[0]);
    local_view = checked_cast(viewGraHeader,top_view->get_header ());
    if (local_view == NULL)
          no_view = 1;
    else{
          dlg = driver_instance->find_dialog_for_view(local_view);
          if (dlg == NULL)
              no_view = 1;          
    }
    if (no_view == 0){
       void * local_window = dlg->window_of_view(local_view);
       ui_get_window_size(local_window, &screen_width, &screen_height);
    }
    else{
       screen_width = DEFAULT_WIND_WIDTH;
       screen_height = DEFAULT_WIND_HEIGHT;
    }
    this->setxmax(screen_width);
    this->setymax(screen_height);
    this->setorientation(bottom_to_top);
    this->setxspace(x_space);
    this->setyspace(y_space);
    this->setzspace(NODE_SPACE);
    if (root_arr == NULL)
        edge_build_root(this, top_view);
    else
        edge_build_root_arr(this, root_arr);
}
aset_graph :: aset_graph ( viewNodePtr root , int x_space , int y_space , objArrPtr root_arr , int uu ) : graph ( ( char * ) NULL ) { Initialize ( aset_graph :: aset_graph ) ; viewSymbolNodePtr top_view ; viewGraHeaderPtr local_view ; int screen_width , screen_height ; dialogPtr dlg = NULL ; up_tree = uu ; int no_view = 0 ; if ( root_arr == NULL ) top_view = checked_cast ( viewSymbolNode , root -> get_first ( ) ) ; else top_view = checked_cast ( viewSymbolNode , ( * root_arr ) [ 0 ] ) ; local_view = checked_cast ( viewGraHeader , top_view -> get_header ( ) ) ; if ( local_view == NULL ) no_view = 1 ; else { dlg = driver_instance -> find_dialog_for_view ( local_view ) ; if ( dlg == NULL ) no_view = 1 ; } if ( no_view == 0 ) { void * local_window = dlg -> window_of_view ( local_view ) ; ui_get_window_size ( local_window , & screen_width , & screen_height ) ; } else { screen_width = DEFAULT_WIND_WIDTH ; screen_height = DEFAULT_WIND_HEIGHT ; } this -> setxmax ( screen_width ) ; this -> setymax ( screen_height ) ; this -> setorientation ( bottom_to_top ) ; this -> setxspace ( x_space ) ; this -> setyspace ( y_space ) ; this -> setzspace ( NODE_SPACE ) ; if ( root_arr == NULL ) edge_build_root ( this , top_view ) ; else edge_build_root_arr ( this , root_arr ) ; }
input view node comes either as a single root or as an array
of view nodes
input view node comes either as a single root or as an array of view nodes
//--------- Executable Code ------------------------------ //  set window size //  build EDGE nodes and edges