]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Debug : link of an outport of a SwitchNode to DefaultInPort of EndSwitchNode
authorrahuel <rahuel@opencascade.com>
Thu, 14 Apr 2005 11:42:09 +0000 (11:42 +0000)
committerrahuel <rahuel@opencascade.com>
Thu, 14 Apr 2005 11:42:09 +0000 (11:42 +0000)
src/GraphBase/DataFlowBase_SwitchNode.cxx

index 2a633873712d4bd11580bc42d2524dd43a44c8f2..ada6a21712444ca7ce9d93fe39ba5dca999339f9 100644 (file)
@@ -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 "