From: rahuel Date: Thu, 14 Apr 2005 11:42:09 +0000 (+0000) Subject: Debug : link of an outport of a SwitchNode to DefaultInPort of EndSwitchNode X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d290d4562c8b800688fcd7aa7f6cf40c09447d4e;p=modules%2Fsuperv.git Debug : link of an outport of a SwitchNode to DefaultInPort of EndSwitchNode --- diff --git a/src/GraphBase/DataFlowBase_SwitchNode.cxx b/src/GraphBase/DataFlowBase_SwitchNode.cxx index 2a63387..ada6a21 100644 --- a/src/GraphBase/DataFlowBase_SwitchNode.cxx +++ b/src/GraphBase/DataFlowBase_SwitchNode.cxx @@ -114,7 +114,20 @@ bool GraphBase::SwitchNode::CheckSwitch() const { // execution will be aborted //Behavior : in that case, that means that a SwitchBranch should be a DefaultBranch and it is not the case ! //1. DEFAULT_OUTPORT - if ( anOutPort->IsGate() ) { +//JR 07.04.2005 Debug : an OutPort of the SwitchNode may be linked to the DefaultPort of +// the EndSwitchNode <==> +// SwitchNode( Default ) --> EndSwitchNode( Default ) + bool EndSwitchNode_Default = false ; + if ( anOutPort->InPortsSize() ) { + GraphBase::InPort * anInPort = anOutPort->ChangeInPorts( 0 ) ; + GraphBase::ComputingNode * aNode ; + aNode = GraphOfNode()->GetChangeGraphNode( anInPort->NodeName() ) ; + if ( aNode == anEndSwitchNode ) { + EndSwitchNode_Default = true ; + } + } +//JR 07.04.2005 if ( anOutPort->IsGate() ) { + if ( anOutPort->IsGate() || EndSwitchNode_Default ) { if ( anOutPort->InPortsSize() == 0 ) { // DefaultPort of the SwitchNode is not connected cdebug_out << Name() << "->SwitchNode::CheckSwitch EndSwitchNode "