From d290d4562c8b800688fcd7aa7f6cf40c09447d4e Mon Sep 17 00:00:00 2001 From: rahuel Date: Thu, 14 Apr 2005 11:42:09 +0000 Subject: [PATCH] Debug : link of an outport of a SwitchNode to DefaultInPort of EndSwitchNode --- src/GraphBase/DataFlowBase_SwitchNode.cxx | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) 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 " -- 2.39.2