Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/superv.git] / src / GraphExecutor / DataFlowExecutor_DataFlow.hxx
index 7e65137ea792813139b2f65d6e9e28d3641777f3..dc8038b0cacd2da6d74641eb89578ef7d65773fa 100644 (file)
@@ -1,3 +1,29 @@
+//  SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton
+//
+//  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+//
+//
+//  File   : DataFlowExecutor_DataFlow.hxx
+//  Module : SUPERV
+
 #ifndef _DATAFLOWEXECUTOR_DATAFLOW_HXX
 #define _DATAFLOWEXECUTOR_DATAFLOW_HXX
 
@@ -16,7 +42,8 @@ namespace GraphExecutor {
       DataFlow();
       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
                 const char * DataFlowName ,
-                const char * DebugFileName );
+                const char * DebugFileName ,
+                const SUPERV::KindOfNode aKindOfNode );
       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
                 const SALOME_ModuleCatalog::Service& DataFlowService ,
                 const char *DataFlowComponentName ,
@@ -25,35 +52,41 @@ namespace GraphExecutor {
                 const SUPERV::KindOfNode DataFlowkind = SUPERV::ComputingNode ,
                 const SUPERV::SDate DataFlowFirstCreation = SUPERV::SDate() ,
                 const SUPERV::SDate DataFlowLastModification = SUPERV::SDate() ,
-                const char * DataFlowEditorRelease = NULL ,
-                const char * DataFlowAuthor = NULL ,
-                const char * DataFlowComputer = NULL ,
-                const char * DataFlowComment = NULL ,
-                const char * DebugFileName = NULL ) ;
+                const char * DataFlowEditorRelease = NULLSTRING ,
+                const char * DataFlowAuthor = NULLSTRING ,
+                const char * DataFlowComputer = NULLSTRING ,
+                const char * DataFlowComment = NULLSTRING ,
+                const char * DebugFileName = NULLSTRING ) ;
       virtual ~DataFlow();
 
-      bool LoadDataFlow( const GraphBase::SGraph &aDataFlow ) ;
-      bool LoadXml( const char* myFileName ) ;
+      bool LoadDataFlow( const GraphBase::SGraph aDataFlow ) ;
+//      bool LoadXml( const char* myFileName ) ;
 
       const SALOME_ModuleCatalog::Service * NodeService( const char * NodeName ) ;
 
-      bool ChangeInputData( const char* ToNodeName ,
-                            const char* ToParameterName ,
+      bool AddInputData( const char * ToNodeName ,
+                         const char * ToParameterName ,
+                         const CORBA::Any aValue = CORBA::Any() ) ;
+      bool ChangeInputData( const char * ToNodeName ,
+                            const char * ToParameterName ,
                             const CORBA::Any aValue = CORBA::Any() ) ;
-      bool AddInputSharedData( const char* ToNodeName1 ,
-                               const char* ToParameterName1 ,
-                               const char* ToNodeName2 ,
-                               const char* ToParameterName2 ) ;
+
+      bool InputOfAny( const char * ToServiceParameterName ,
+                       const CORBA::Any & aValue ,
+                       const bool SomeDataReady = true ) ;
+      bool OutputOfAny( const char * aNodeName ,
+                        const char * ToServiceParameterName ,
+                        const CORBA::Any & aValue ) ;
+      bool SetWaitingStates( const char * ToServiceParameterName ) ;
 
       bool IsValid() ;
       bool IsExecutable() ;
 
       bool Run( const bool AndSuspend ) ;
-      bool Run( const char * aNodeName ,
-                const char * AtNodeName , const bool AndSuspend ) ;
 
       long LastLevelDone() ;
 
+      void State(GraphExecutor::AutomatonState aState ) ;
       SUPERV::GraphState State() ;
       SUPERV::GraphState State(const char * aNodeName ) ;
       SUPERV::GraphState State( const char * aNodeName ,
@@ -62,8 +95,8 @@ namespace GraphExecutor {
       long Thread() ;
       long Thread(const char * aNodeName ) ;
 
-      SUPERV::AutomatonState AutomatonState() ;
-      SUPERV::AutomatonState AutomatonState(const char * aNodeName ) ;
+      GraphExecutor::AutomatonState AutomatonState() ;
+      GraphExecutor::AutomatonState AutomatonState(const char * aNodeName ) ;
 
       SUPERV::ControlState ControlState() ;
       SUPERV::ControlState ControlState(const char * aNodeName ) ;
@@ -77,6 +110,7 @@ namespace GraphExecutor {
       bool EventW( char ** aNodeName ,
                    SUPERV::GraphEvent & anEvent ,
                    SUPERV::GraphState & aState ) ;
+      long EventQSize() ;
 
       bool IsWaiting() ;
       bool IsReady() ;
@@ -88,13 +122,15 @@ namespace GraphExecutor {
       bool IsRunning(const char * aNodeName ) ;
       bool IsDone(const char * aNodeName ) ;
       bool IsSuspended(const char * aNodeName ) ;
-      bool IsDone(const char * aNodeName ,
-                  const char * anOutServiceParameterName ) ;
-
-      const CORBA::Any *GetInData( const char * ToNodeName ,
-                                   const char * ToParameterName ) ;
-      const CORBA::Any *GetOutData( const char * FromNodeName ,
-                                    const char * FromParameterName ) ;
+      bool PortDone( const char * aNodeName ,
+                     const char * anOutServiceParameterName ) ;
+
+//JR 30.03.2005      const CORBA::Any *GetInData( const char * ToNodeName ,
+      const CORBA::Any GetInData( const char * ToNodeName ,
+                                  const char * ToParameterName ) ;
+//JR 30.03.2005      const CORBA::Any *GetOutData( const char * FromNodeName ,
+      const CORBA::Any GetOutData( const char * FromNodeName ,
+                                   const char * FromParameterName ) ;
 
       long Threads() ;