Salome HOME
*** empty log message ***
[modules/superv.git] / src / Supervision / GNode_Impl.hxx
index d645622b5f8d0ee593441e705b0e91a10e0d9caf..72eed81da83e0ec3f3140671c857ce5dbd456e90 100644 (file)
@@ -1,16 +1,18 @@
-//=============================================================================
-// File      : GNode_Impl.hxx
-// Created   : 2003
-// Author    : Jean Rahuel
-// Project   : SALOME
-// Copyright : CEA 2003
-// $Header: 
-//=============================================================================
+//  SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
+//
+//  Copyright (C) 2003  CEA/DEN, EDF R&D
+//
+//
+//
+//  File   : GNode_Impl.hxx
+//  Author : Jean Rahuel
+//  Module : SUPERV
+//  $Header: 
 
 #ifndef _GNODE_IMPL_HXX_
 #define _GNODE_IMPL_HXX_
 
-#include <iostream.h>
+//#include <iostream.h>
 
 #include "CORBA.h"
 
@@ -65,34 +67,35 @@ class GNode_Impl : public INode_Impl ,
 
     virtual bool SetCoupled( const char * anInLineNode ) {
             GraphBase::InLineNode * CoupledINode = (GraphBase::InLineNode * ) DataFlowEditor()->GetGraphNode( anInLineNode ) ;
-            cout << Name() << ".SetCoupled " << anInLineNode << endl ;
-            if ( CoupledINode && ( IsGOTO() &&
+//            cout << Name() << ".SetCoupled " << anInLineNode << endl ;
+//            if ( CoupledINode && ( IsGOTO() &&
+            if ( ( IsGOTO() &&
                    ( CoupledINode->IsInLineNode() || CoupledINode->IsLoopNode() ||
                      CoupledINode->IsSwitchNode() ) ) ||
                  ( !IsGOTO() && ( IsLoop() || IsSwitch() ||
                                   IsEndLoop() || IsEndSwitch() ) ) ) {
               DataFlowNode()->CoupledNode( CoupledINode ) ;
-              if ( IsSwitch() ) {
+              if ( CoupledINode && IsSwitch() ) {
                 DataFlowEditor()->AddLink( Name() , "Default" ,
                                            CoupledINode->Name() , "Default" ) ;
              }
-              else if ( IsLoop() || IsEndLoop() ) {
+              else if ( CoupledINode && ( IsLoop() || IsEndLoop() ) ) {
                 DataFlowEditor()->AddLink( Name() , "DoLoop" ,
                                            CoupledINode->Name() , "DoLoop" ) ;
              }
-              else if ( IsGOTO() ) {
+              else if ( CoupledINode && IsGOTO() ) {
                 DataFlowEditor()->AddLink( Name() , "OutGate" ,
                                            CoupledINode->Name() , "InGate" ) ;
              }
-              cout << "SetCoupled " << CoupledINode->Name() << endl ;
+//              cout << "SetCoupled " << CoupledINode->Name() << endl ;
               return  true ;
            }
-            cout << Name() << ".SetCoupled ERROR " << anInLineNode << " " << CoupledINode
-                 << " of " << Kind() ;
-            if ( CoupledINode ) {
-              cout << " kinfOkCoupled " << CoupledINode->Kind() ;
-           }
-            cout << endl ;
+//            cout << Name() << ".SetCoupled ERROR " << anInLineNode << " " << CoupledINode
+//                 << " of " << Kind() ;
+//            if ( CoupledINode ) {
+//              cout << " kinfOkCoupled " << CoupledINode->Kind() ;
+//         }
+//            cout << endl ;
             return false ; } ;
     virtual SUPERV::INode_ptr Coupled() ;