From: rahuel Date: Wed, 9 Mar 2005 08:50:01 +0000 (+0000) Subject: IsValid and Valid methods have now an optionnal parameter kLoopSwitch which is true... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f8e4dd227874252eec1176d5ebecb5e4bcd1f166;p=modules%2Fsuperv.git IsValid and Valid methods have now an optionnal parameter kLoopSwitch which is true by default : In some cases we do not need to check the validity of Loops and Switches --- diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.hxx b/src/GraphEditor/DataFlowEditor_DataFlow.hxx index 1bc4096..dbdcddb 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.hxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.hxx @@ -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 diff --git a/src/GraphEditor/DataFlowEditor_DataFlow.lxx b/src/GraphEditor/DataFlowEditor_DataFlow.lxx index 93bfb43..c6f20ec 100644 --- a/src/GraphEditor/DataFlowEditor_DataFlow.lxx +++ b/src/GraphEditor/DataFlowEditor_DataFlow.lxx @@ -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 ) ;