Salome HOME
IsValid and Valid methods have now an optionnal parameter kLoopSwitch which is true...
[modules/superv.git] / src / GraphEditor / DataFlowEditor_DataFlow.lxx
index e09bb9f6ec2d8769b22f27650afa8c15d19950ad..c6f20ecbf3d61b58afbd878ab4dc080704b131c0 100644 (file)
@@ -420,37 +420,28 @@ inline const CORBA::Any *GraphEditor::DataFlow::GetOutData(
                                            FromParameterName ) ;
 }
 
-inline bool GraphEditor::DataFlow::IsValid() {
-  return GraphEditor::OutNode::IsValid() ;
+//JR Optional parameter kLoopSwitch (default = true) :
+//In some cases we do not need to check the validity of loops and switchs
+inline bool GraphEditor::DataFlow::IsValid(bool kLoopSwitch ) {
+  return GraphEditor::OutNode::IsValid( kLoopSwitch ) ;
 }
 
 inline bool GraphEditor::DataFlow::IsExecutable() {
   return GraphEditor::OutNode::IsExecutable() ;
 }
 
-inline void GraphEditor::DataFlow::Executing( bool b ) {
-  cdebug << "Executing _Executing = " << b << endl ;
-  _Executing = b ;
+inline void GraphEditor::DataFlow::Executing() {
+  cdebug << "Editor::DataFlow::Executing() : set _Executing = true " << endl ;
+  _Executing = true ;
 }
 
 inline bool GraphEditor::DataFlow::IsExecuting() {
-/*
-  if ( _DataFlowExecutor ) {
-    cdebug << " IsDone " << _DataFlowExecutor->IsDone() << " State " << _DataFlowExecutor->State() ;
-  }
-  cdebug << endl ;
-  if ( _Executing && _DataFlowExecutor ) {
-    if ( _DataFlowExecutor->IsDone() ) {
-      _Executing = false ;
-    }
-  }
-*/
   return _Executing ;
 }
 
 
 inline void GraphEditor::DataFlow::Editing() {
-  cdebug << "Editing _Executing = false " << endl ;
+  cdebug << "Editor::DataFlow::Editing() : set _Executing = false " << endl ;
   _Executing = false ;
 }
 
@@ -477,14 +468,14 @@ inline bool GraphEditor::DataFlow::IsReadOnly() {
 }
 
 inline long GraphEditor::DataFlow::LevelMax() {
-  if ( !IsValid() ) {
+  if ( !IsValid( false ) ) {
     return 0 ;
   }
   return Graph()->LevelMax() ;
 }
 
 inline SUPERV::ListOfStrings * GraphEditor::DataFlow::LevelNodes(long aLevel ) {
-  if ( !IsValid() ) {
+  if ( !IsValid( false ) ) {
     return ((SUPERV::ListOfStrings * ) NULL ) ;
   }
   return Graph()->LevelNodes( aLevel ) ;