Salome HOME
The following methods and constants were removed as never being used:
[modules/superv.git] / src / GraphExecutor / DataFlowExecutor_InNode.hxx
index ec6d305a92277bfcd76767ac9b2f7d90df135473..acfe87b0a243b2f70aa08aa728395358a4efe0ef 100644 (file)
@@ -33,6 +33,9 @@
 
 #include <Python.h>
 
+#include "SALOME_Container_i.hxx"
+
+#include "DataFlowBase_Graph.hxx"
 #include "DataFlowBase_FactoryNode.hxx"
 #include "DataFlowBase_GOTONode.hxx"
 #include "DataFlowBase_LoopNode.hxx"
@@ -42,6 +45,8 @@
 
 #include "DataFlowExecutor_FiniteStateMachine.hxx"
 
+#define MAXSTACKTHREADSIZE 127
+
 void * run_function(void *p);
 
 extern GraphExecutor::FiniteStateMachine * theAutomaton ;
@@ -70,19 +75,21 @@ namespace GraphExecutor {
       GraphBase::EndOfLoopNode       * _EndOfLoopNode ;
       GraphBase::SwitchNode          * _SwitchNode ;
       GraphBase::EndOfSwitchNode     * _EndOfSwitchNode ;
+      GraphBase::Graph               * _GraphMacroNode ;
 
       PyObject                       * _MyPyRunMethod ;
 
       bool                             _createNewThread ;
       bool                             _createNewThreadIf ;
       int                              _RewindStack ;
-      SUPERV::AutomatonState           _OldState ;
-      SUPERV::AutomatonState           _currentState ;
+      GraphExecutor::AutomatonState    _OldState ;
+      GraphExecutor::AutomatonState    _currentState ;
       GraphExecutor::NodeEvent         _CurrentEvent ;
       SUPERV::ControlState             _ControlState ;
-      SUPERV::AutomatonState           _NextState ;
+      GraphExecutor::AutomatonState    _NextState ;
       GraphExecutor::StateEventAction  _NextAction ;
       bool                             _PyFuncRunned ;
+      bool                             _Loading ;
     
       pthread_mutex_t                  _MutexDataWait ;
       bool                             _DataWait ;
@@ -106,6 +113,9 @@ namespace GraphExecutor {
       bool                             _KillSync ;
       pthread_cond_t                   _StopWait ;
 
+      pthread_cond_t                   _ThreadStartedWait ;
+      bool                             _ThreadStartedSync ;
+
       pthread_t                        _Pythread ;
       long                             _PyCpuUsed ;
       long                             _PyTotCpuUsed ;
@@ -163,8 +173,12 @@ namespace GraphExecutor {
                  return _ComputingNode->IsOneOfInLineNodes() ; } ;
       const bool IsOneOfGOTONodes() const {
                  return _ComputingNode->IsOneOfGOTONodes() ; } ;
+      const bool IsMacroNode() const {
+                 return _ComputingNode->IsMacroNode() ; } ;
       const bool IsDataFlowNode() const {
                  return _ComputingNode->IsDataFlowNode() ; } ;
+      const bool IsDataStreamNode() const {
+                 return _ComputingNode->IsDataStreamNode() ; } ;
       const bool IsLoopNode() const {
                  return _ComputingNode->IsLoopNode() ; } ;
       const bool IsEndLoopNode() const {
@@ -202,6 +216,16 @@ namespace GraphExecutor {
                               } ;
       GraphBase::LoopNode * LoopNode() {
                             return _LoopNode ; } ;
+      GraphBase::Graph * GraphMacroNode() {
+                         return _GraphMacroNode ; } ;
+
+      SUPERV::CNode_var ObjRef() const { return _ComputingNode->ObjRef() ; } ;
+      void SetObjRef( SUPERV::CNode_var aNode ) {
+                     _ComputingNode->SetObjRef( aNode ) ; } ;
+
+      CNode_Impl * ObjImpl() const { return _ComputingNode->ObjImpl() ; } ;
+      void SetObjImpl( CNode_Impl * aGraph ) {
+                       _ComputingNode->SetObjImpl( aGraph ) ; } ;
 
       Engines::Component_var Component() const ;
       Engines::Container_var Container() const ;
@@ -229,20 +253,25 @@ namespace GraphExecutor {
                               return GOTONode()->CoupledNode() ; } ;
 
       GraphBase::InPort * AddInPort( const char * InputParameterName ,
-                                     const char * InputParameterType ) {
+                                     const char * InputParameterType ,
+                                     const SUPERV::KindOfPort aKindOfPort ) {
                           return _ComputingNode->AddInPort( InputParameterName ,
-                                                            InputParameterType ) ; } ;
+                                                            InputParameterType ,
+                                                            aKindOfPort ) ; } ;
       GraphBase::OutPort * AddOutPort( const char * OutputParameterName ,
-                                       const char * OutputParameterType ) {
+                                       const char * OutputParameterType ,
+                                       const SUPERV::KindOfPort aKindOfPort ) {
                            return _ComputingNode->AddOutPort( OutputParameterName ,
-                                                              OutputParameterType ) ; } ;
+                                                              OutputParameterType ,
+                                                              aKindOfPort ) ; } ;
 //      void InOutPort( GraphBase::InPort * InputPort ,
 //                      GraphBase::OutPort * OutputPort ) {
 //           return _ComputingNode->InOutPort( InputPort , OutputPort ) ; } ;
       int LinkedNodesSize() const {
           return _ComputingNode->LinkedNodesSize() ; } ;
-      GraphBase::ComputingNode * LinkedNodes( int i ) const {
-                                 return _ComputingNode->LinkedNodes( i ) ; } ;
+//      GraphBase::ComputingNode * LinkedNodes( int i ) const {
+      GraphBase::StreamNode * LinkedNodes( int i ) const {
+                              return _ComputingNode->LinkedNodes( i ) ; } ;
       const int LinkedInPortsNumber( int i ) const {
                 return _ComputingNode->LinkedInPortsNumber( i ) ; } ;
 
@@ -289,9 +318,13 @@ namespace GraphExecutor {
       bool PyFuncRunned() {
            return _PyFuncRunned ; } ;
 
+      void OutNode( GraphExecutor::OutNode * theOutNode ) {
+           _OutNode = theOutNode ; } ;
+
       bool InitPython() ;
       PyObject * InitPyDynInvoke( char * PyFuncName ,
-                                  const SUPERV::ListOfStrings * aPythonFunction ) ;
+                                  const SUPERV::ListOfStrings * aPythonFunction ,
+                                  bool & Err ) ;
 
       void LockDataWait() ;
       void UnLockDataWait() ;
@@ -305,7 +338,6 @@ namespace GraphExecutor {
       bool Suspend() ;
       bool SuspendDone() ;
       bool Resume() ;
-      bool ReStart( const char * AtNodeName , const bool AndSuspend ) ;
       bool Stop() ;
 
       void CreateNewThread( bool k_create ) { _createNewThread = k_create ; } ;
@@ -317,9 +349,9 @@ namespace GraphExecutor {
       void RewindStack( int aRewindStack ) { _RewindStack = aRewindStack ; } ;
       int RewindStack() const { return _RewindStack ; } ;
 
-      SUPERV::AutomatonState State() const {
+      GraphExecutor::AutomatonState State() const {
              return _currentState; };
-      void State(SUPERV::AutomatonState aState ) {
+      void State(GraphExecutor::AutomatonState aState ) {
 //           cdebug << "GraphExecutor::InNode::State( "
 //                  << Automaton()->StateName( _currentState ) << " --> "
 //                  << Automaton()->StateName( aState ) << " )"  << endl ;
@@ -343,6 +375,8 @@ namespace GraphExecutor {
       bool IsSuspended() ;
       bool IsKilled() ;
       bool IsStopped() ;
+      void IsLoading( bool Loading );
+      bool IsLoading() { return _Loading ; } ;
 
       bool StateWait( SUPERV::GraphState aState ) ;
       bool ReadyWait() ;
@@ -350,7 +384,8 @@ namespace GraphExecutor {
       bool DoneWait() ;
       bool SuspendedWait() ;
 
-      void InitialState( GraphExecutor::OutNode * theOutNode );
+      void InitialState() ;
+      bool InitPythonFunctions(bool WithErr ) ;
       void SetWaitingStates(GraphExecutor::InNode * EndNode ) ;
 
       int SendEvent(const GraphExecutor::NodeEvent anEvent ) ;
@@ -370,6 +405,8 @@ namespace GraphExecutor {
                           GraphExecutor::NodeEvent anEvent ) ;
       void KillAction() ;
       void KilledAction() ;
+      void ThreadStartAction() ;
+      void ThreadStartedAction() ;
       void StopAction() ;
       void StoppedAction() ;
       int executeAction() ; // New Thread or Same Thread
@@ -434,6 +471,10 @@ namespace GraphExecutor {
       long PyCpuUsed( bool tot = false ) ;
       void SetPyCpuUsed() ;
       long PyCpu() ;
+
+      bool PyRunSimpleString( char* thePyString );
+      PyObject * PyEvalCallObject( PyObject * MyPyRunMethod ,
+                                   PyObject * ArgsList ) ;
     } ;
 
 } ;