]> SALOME platform Git repositories - modules/superv.git/commitdiff
Salome HOME
IsValid and Valid methods have now an optionnal parameter kLoopSwitch which is true...
authorrahuel <rahuel@opencascade.com>
Wed, 9 Mar 2005 08:50:01 +0000 (08:50 +0000)
committerrahuel <rahuel@opencascade.com>
Wed, 9 Mar 2005 08:50:01 +0000 (08:50 +0000)
In some cases we do not need to check the validity of Loops and Switches

src/GraphEditor/DataFlowEditor_DataFlow.hxx
src/GraphEditor/DataFlowEditor_DataFlow.lxx

index 1bc4096c58a512834087b9275b5053f69f670857..dbdcddb65c784ca9d238e0e0a97f126913e78b6e 100644 (file)
@@ -210,7 +210,7 @@ namespace GraphEditor {
       const CORBA::Any * GetOutData( const char * FromNodeName ,
                                      const char * FromParameterName ) ;
 
-      bool IsValid() ;
+      bool IsValid(bool kLoopSwitch = true ) ;
       bool IsExecutable() ;
 
       void Executing() ; // asv : removed a bool parameter, use Editing() to set _Executing = false
index 93bfb43c4f4a7f65b8acf7e7f3ed6c0f32705e32..c6f20ecbf3d61b58afbd878ab4dc080704b131c0 100644 (file)
@@ -420,8 +420,10 @@ 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() {
@@ -466,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 ) ;