]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
Debug of PAL8919 :
authorrahuel <rahuel@opencascade.com>
Thu, 26 May 2005 13:00:25 +0000 (13:00 +0000)
committerrahuel <rahuel@opencascade.com>
Thu, 26 May 2005 13:00:25 +0000 (13:00 +0000)
The OutPorts of LoopNodes and the InPorts of the EndLoopNodes may not be in the Service created in the Graph

src/GraphBase/DataFlowBase_Graph.cxx

index 169fc9ab5d6ce63315c126fefdf90d2ad5cb79ec..eeea99e301bbec6e2b6a3321a90537d43f40abf1 100644 (file)
@@ -1648,7 +1648,10 @@ bool GraphBase::Graph::CreateService() {
          }
           if ( !anInPort->IsGate() && !anInPort->IsLoop() &&
                ( !anInPort->IsPortConnected() ||
-                 ( anInPort->IsPortConnected() && isfromcouplednode ) ) ) {
+//                 ( anInPort->IsPortConnected() && isfromcouplednode ) ) ) {
+//JR PAL8914 : InPorts of EndLoopNodes may not be in the Service of the Graph
+                 ( anInPort->IsPortConnected() && isfromcouplednode ) ) &&
+               !aToNode->IsEndLoopNode() ) {
             if ( dostore == 0 ) {
               cdebug << "CreateService " << aToNode->Name() << " Input port "
                      << anInPort->PortName() << " " << anInPort->Kind() << " " << anInPort->PortStatus() ;
@@ -1711,8 +1714,11 @@ bool GraphBase::Graph::CreateService() {
 //            cdebug << " NULL" << endl ;
 //       }
           if ( !aFromNode->IsGOTONode() ) {
-            if ( !anOutPort->IsGate() && ( anOutPort->IsNotConnected() || anOutPort->IsDataConnected() ) ||
-                                           anOutPort->IsExternConnected() ) {
+            if ( !anOutPort->IsGate() && ( anOutPort->IsNotConnected() || anOutPort->IsDataConnected()  ||
+//JR PAL8914 : OutPorts of LoopNodes may not be in the Service of the Graph
+//                                           anOutPort->IsExternConnected() ) {
+                                           anOutPort->IsExternConnected() ) &&
+                 !aFromNode->IsLoopNode() ) {
               if ( dostore == 0 ) {
 //                cdebug << "CreateService " << aFromNode->Name() << " Output port "
 //                       << anOutPort->PortName() << " " << anOutPort->PortStatus() << endl ;
@@ -1859,7 +1865,9 @@ bool GraphBase::Graph::CreateService() {
                  << anInPort->PortStatus() << " --> AddInputData" << endl ;
        }
       }
-      else if ( !anInPort->IsGate() && anInPort->IsNotConnected() ) {
+//JR PAL8914 : InPorts of EndLoopNodes may not be in the Service of the Graph
+//      else if ( !anInPort->IsGate() && anInPort->IsNotConnected() ) {
+      else if ( !anInPort->IsGate() && anInPort->IsNotConnected() && !aToNode->IsEndLoopNode() ) {
         if ( !AddLink( this , GetChangeInDataNodePort( anInPort->NodePortName() ) , aToNode , anInPort ) ) {
           cdebug << "CreateService In" << j << " " << anInPort->NodeName() << "(" << anInPort->PortName() << ") "
                  << anInPort->PortStatus() << " --> AddInLink ERROR" << endl ;
@@ -1875,7 +1883,10 @@ bool GraphBase::Graph::CreateService() {
       GraphBase::OutPort *anOutPort = aToNode->GetChangeNodeOutPort(j) ;
       cdebug << "CreateService Out" << j << " " << anOutPort->NodeName() << "(" << anOutPort->PortName()
              << ") " << anOutPort->PortStatus() << " :" << endl ;
-      if ( !anOutPort->IsGate() && anOutPort->IsNotConnected() && !aToNode->IsGOTONode() ) {
+//JR PAL8914 : OutPorts of LoopNodes may not be in the Service of the Graph
+//      if ( !anOutPort->IsGate() && anOutPort->IsNotConnected() && !aToNode->IsGOTONode() ) {
+      if ( !anOutPort->IsGate() && anOutPort->IsNotConnected() && !aToNode->IsGOTONode() &&
+        !aToNode->IsLoopNode() ) {
         GraphBase::InPort *anInPort = GetChangeOutDataNodePort( anOutPort->NodePortName() ) ;
         if ( !AddLink( aToNode , anOutPort , this , anInPort ) ) {
           cdebug << "       --> " << Name() << "(" << anInPort->PortName()