model_server/lde/src/lde-decorate.cxx
//  adjust_hierarchy_level does not create any new nodes, but sets
//  levels on each of the symbols and connections of the subtree.
adjust_hierarchy_level does not create any new nodes, but sets
levels on each of the symbols and connections of the subtree.
adjust_hierarchy_level does not create any new nodes but sets levels on each of the symbols and connections of the subtree .
void adjust_hierarchy_levels (ldrHierarchyNodePtr root, int level)
{
   ldrSymbolNodePtr root_symbol;
   Initialize (lde_decorate);
   root_symbol = checked_cast(ldrSymbolNode, root->get_first());
   root_symbol->set_graphlevel(level);
   for(ldrNodePtr child = checked_cast(ldrNode, root_symbol->get_next());
       child != NULL;
       child = checked_cast(ldrNode, child->get_next())) {
      int new_level = level + 1;
      if (child->ldrIsA(ldrConnectionNodeType))
	child->set_graphlevel(new_level);
      else adjust_hierarchy_levels(checked_cast(ldrHierarchyNode,child), new_level);
   }
   Return;
}
void adjust_hierarchy_levels ( ldrHierarchyNodePtr root , int level ) { ldrSymbolNodePtr root_symbol ; Initialize ( lde_decorate ) ; root_symbol = checked_cast ( ldrSymbolNode , root -> get_first ( ) ) ; root_symbol -> set_graphlevel ( level ) ; for ( ldrNodePtr child = checked_cast ( ldrNode , root_symbol -> get_next ( ) ) ; child != NULL ; child = checked_cast ( ldrNode , child -> get_next ( ) ) ) { int new_level = level + 1 ; if ( child -> ldrIsA ( ldrConnectionNodeType ) ) child -> set_graphlevel ( new_level ) ; else adjust_hierarchy_levels ( checked_cast ( ldrHierarchyNode , child ) , new_level ) ; } Return ; }
adjust_hierarchy_level does not create any new nodes, but sets
levels on each of the symbols and connections of the subtree.
adjust_hierarchy_level does not create any new nodes but sets levels on each of the symbols and connections of the subtree .