model_server/lde/src/lde-hierarchy.cxx
// find_connection finds a  connection  node
// among children of root.   There  are must
// be exactly one connection.
find_connection finds a  connection  node
among children of root.   There  are must
be exactly one connection.
find_connection finds a connection node among children of root . There are must be exactly one connection .
static
ldrConnectionNodePtr find_connection(ldrNodePtr root)
{
   Initialize(find_connection);
   ldrConnectionNodePtr connection = NULL;
   for(ldrNodePtr child = checked_cast(ldrNode, root->get_first());
       child != NULL;
       child = checked_cast(ldrNode, child->get_next())) {
      if (child->ldrIsA(ldrConnectionNodeType)) {
	 if (connection != NULL)
	   Error(TOO_MANY_CONNECTIONS);
	 else connection = checked_cast(ldrConnectionNode, child);
      }
   }
   return(connection);
}
static ldrConnectionNodePtr find_connection ( ldrNodePtr root ) { Initialize ( find_connection ) ; ldrConnectionNodePtr connection = NULL ; for ( ldrNodePtr child = checked_cast ( ldrNode , root -> get_first ( ) ) ; child != NULL ; child = checked_cast ( ldrNode , child -> get_next ( ) ) ) { if ( child -> ldrIsA ( ldrConnectionNodeType ) ) { if ( connection != NULL ) Error ( TOO_MANY_CONNECTIONS ) ; else connection = checked_cast ( ldrConnectionNode , child ) ; } } return ( connection ) ; }
find_connection finds a  connection  node
among children of root.
find_connection finds a connection node among children of root .