X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSupervision%2FGNode_Impl.hxx;h=72eed81da83e0ec3f3140671c857ce5dbd456e90;hb=88e9fd6b2607ba9de53e5b5e0fd4c59fd3d6d885;hp=d645622b5f8d0ee593441e705b0e91a10e0d9caf;hpb=d2ea75950816c9bb41f70a80a8c4339d3d0ff9a5;p=modules%2Fsuperv.git diff --git a/src/Supervision/GNode_Impl.hxx b/src/Supervision/GNode_Impl.hxx index d645622..72eed81 100644 --- a/src/Supervision/GNode_Impl.hxx +++ b/src/Supervision/GNode_Impl.hxx @@ -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 +//#include #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() ;