]> SALOME platform Git repositories - modules/superv.git/blobdiff - src/GraphEditor/DataFlowEditor_DataFlow.lxx
Salome HOME
NRI : Merge from V1_2.
[modules/superv.git] / src / GraphEditor / DataFlowEditor_DataFlow.lxx
index 3eb2e8d4575593caf36619abfac1f8dabe49309e..b248b3b0909c8199e8e7651e340e8f8708755561 100644 (file)
@@ -1,3 +1,29 @@
+//  SUPERV GraphEditor : contains classes that permit edition of graphs
+//
+//  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
+// 
+//  This library is free software; you can redistribute it and/or 
+//  modify it under the terms of the GNU Lesser General Public 
+//  License as published by the Free Software Foundation; either 
+//  version 2.1 of the License. 
+// 
+//  This library is distributed in the hope that it will be useful, 
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of 
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+//  Lesser General Public License for more details. 
+// 
+//  You should have received a copy of the GNU Lesser General Public 
+//  License along with this library; if not, write to the Free Software 
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
+// 
+//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
+//
+//
+//
+//  File   : DataFlowEditor_DataFlow.lxx
+//  Module : SUPERV
+
 #ifndef _DATAFLOWEDITOR_DATAFLOW_LXX
 #define _DATAFLOWEDITOR_DATAFLOW_LXX
 
@@ -35,18 +61,21 @@ inline bool GraphEditor::DataFlow::LoadDataFlow(
                        const GraphBase::SGraph *aDataFlow ) {
   if ( _ReadOnly )
     return false ;
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::LoadDataFlow( aDataFlow ) ; 
 } ;
 
 inline bool GraphEditor::DataFlow::LoadXml( const char* myFileName ) {
   if ( _ReadOnly )
     return false ;
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::LoadXml( myFileName ) ; 
 } ;
 
 inline bool GraphEditor::DataFlow::LoadInfo( const GraphBase::SNode &aDataFlowInfo ) {
   if ( _ReadOnly )
     return false ;
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::LoadInfo( aDataFlowInfo ) ; 
 } ;
 
@@ -108,6 +137,7 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::AddNode(
                       const int NodeY) {
   if ( _ReadOnly )
     return (GraphEditor::InNode * ) NULL ;
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::AddNode( NodeService ,
                                         aFuncName , aPythonFunction ,
                                         NodeComponentName ,
@@ -127,6 +157,7 @@ inline GraphEditor::InNode * GraphEditor::DataFlow::GetNode( const char* NodeNam
 inline bool GraphEditor::DataFlow::RemoveNode( const char* NodeName ) {
   if ( _ReadOnly )
     return false ;
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::RemoveNode( NodeName ) ; 
 } ;
 
@@ -134,6 +165,7 @@ inline bool GraphEditor::DataFlow::ReNameNode( const char* OldNodeName ,
                                                const char* NewNodeName ) {
   if ( _ReadOnly )
     return false ;
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::ReNameNode( OldNodeName , NewNodeName ) ; 
 } ;
 
@@ -145,6 +177,7 @@ inline const SALOME_ModuleCatalog::Service * GraphEditor::DataFlow::NodeService(
 }
 
 inline void GraphEditor::DataFlow::Coordinates( const int X , const int Y ) {
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::Coordinates( X , Y ) ; 
 } ;
 
@@ -194,6 +227,7 @@ inline bool GraphEditor::DataFlow::AddLink( const char* FromNodeName ,
   if ( _ReadOnly )
     return false ;
   CORBA::Any const * theValue = GetNode( FromNodeName )->GetOutPort( FromServiceParameterName )->Value() ; // Keep the type !
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::AddLink( FromNodeName ,
                                         FromServiceParameterName ,
                                         ToNodeName ,
@@ -225,6 +259,7 @@ inline bool GraphEditor::DataFlow::AddLinkCoord(
                          const int nXY ,
                          const int* X ,
                          const int* Y ) {
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::AddLinkCoord( FromNodeName ,
                                              FromServiceParameterName ,
                                              ToNodeName ,
@@ -240,6 +275,7 @@ inline bool GraphEditor::DataFlow::AddLinkCoord(
                          const int index ,
                          const int X ,
                          const int Y ) {
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::AddLinkCoord( FromNodeName ,
                                              FromServiceParameterName ,
                                              ToNodeName ,
@@ -255,6 +291,7 @@ inline bool GraphEditor::DataFlow::ChangeLinkCoord(
                          const int index ,
                          const int X ,
                          const int Y ) {
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::ChangeLinkCoord( FromNodeName ,
                                                 FromServiceParameterName ,
                                                 ToNodeName ,
@@ -268,6 +305,7 @@ inline bool GraphEditor::DataFlow::RemoveLinkCoord(
                          const char* ToNodeName ,
                          const char* ToServiceParameterName ,
                          const int index ) {
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::RemoveLinkCoord( FromNodeName ,
                                                 FromServiceParameterName ,
                                                 ToNodeName ,
@@ -319,6 +357,7 @@ inline bool GraphEditor::DataFlow::RemoveLink(
                          const char* ToServiceParameterName ) {
   if ( _ReadOnly )
     return false ;
+  _EditedAfterExecution = true ;
   return GraphEditor::OutNode::RemoveLink( FromNodeName ,
                                            FromServiceParameterName ,
                                            ToNodeName ,
@@ -404,6 +443,14 @@ inline bool GraphEditor::DataFlow::IsEditing() {
   return !IsExecuting() ;
 }
 
+inline void GraphEditor::DataFlow::EditedAfterExecution(bool EditedAfterExecution ) {
+  _EditedAfterExecution = EditedAfterExecution ;
+}
+
+inline bool GraphEditor::DataFlow::EditedAfterExecution() {
+  return _EditedAfterExecution ;
+}
+
 inline bool GraphEditor::DataFlow::IsReadOnly() {
   return _ReadOnly ;
 }
@@ -434,6 +481,7 @@ inline long GraphEditor::DataFlow::GraphsNumber() {
 
 inline void GraphEditor::DataFlow::Executor(
                                GraphExecutor::DataFlow * DataFlowExecutor ) {
+  _Executing = true ;
   _DataFlowExecutor = DataFlowExecutor ;
 }