Salome HOME
A part of the code of Valid() method is now in Executable() method
authormkr <mkr@opencascade.com>
Wed, 28 Sep 2005 12:26:21 +0000 (12:26 +0000)
committermkr <mkr@opencascade.com>
Wed, 28 Sep 2005 12:26:21 +0000 (12:26 +0000)
(according to JR modification from 07.07.2005): if in Executable() method
we found that dataflow is not valid, therefore it is not executable in that
case and _Executable = false.

src/GraphEditor/DataFlowEditor_OutNode.cxx

index 172dc214c02a7e33e1d48372b789ba401f11a816..5221b4f8f01ffc09eb0b925e8236f1798842bc0d 100644 (file)
@@ -1046,14 +1046,16 @@ bool GraphEditor::OutNode::Executable() {
   }
 
 //JR 07.07.2005 PAL9342 : that code is now in Executable() method instead of Valid() method
+  bool IsValid = true;
   int SubStreamGraphsNumber = 0 ;
   if ( !Graph()->Sort( SubStreamGraphsNumber ) ) {
     cdebug << "Editor::OutNode::Executable This DataFlow is not valid(Sort)." << endl ;
     RetVal = false ;
+    //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+    IsValid = false ;
   }
-  if ( Graph()->IsDataStreamNode() ) {
+  if ( Graph()->IsDataStreamNode() )
     StreamGraph()->SubStreamGraphsNumber( SubStreamGraphsNumber ) ;
-  }
 
   Graph()->InLineServices() ;
 
@@ -1061,10 +1063,14 @@ bool GraphEditor::OutNode::Executable() {
     if ( !Graph()->ValidLoops() ) {
       cdebug << "Editor::OutNode::Executable This DataFlow have not valid Loops(ValidLoops)." << endl ;
       RetVal = false ;
+      //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+      IsValid = false ;
     }
     if ( !Graph()->ValidSwitchs() ) {
       cdebug << "Editor::OutNode::Executable This DataFlow have not valid Switchs(ValidSwitchs)." << endl ;
       RetVal = false ;
+      //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+      IsValid = false ;
     }
 //  }
   
@@ -1088,6 +1094,9 @@ bool GraphEditor::OutNode::Executable() {
     RetVal = false ;
   }    
 
+  //mkr : 28.09.2005 : if dataflow is not valid => it is not executable
+  if ( !IsValid ) _Executable = false ;
+
   cdebug_out << "GraphEditor::OutNode::Executable _Executable " << _Executable << " RetVal " << RetVal
              << endl;
   return RetVal ;