Salome HOME
MacroNodes and omniORB4 porting and state of nodes when an other node has aborted
[modules/superv.git] / src / GraphExecutor / DataFlowExecutor_OutNode.hxx
index a882cf32bcb8228736553f89453b4b747f828e18..4746eaf08c196e28efbb33d3b863ed390ee5288b 100644 (file)
@@ -53,13 +53,18 @@ namespace GraphExecutor {
       GraphExecutor::AutomatonState  _State ;
       SUPERV::ControlState    _ControlState ;
       bool                    _Done ;
+      bool                    _NodeAborted ;
 
+      // asv : 20.01.05 : changes involved with switching to old (HEAD) KERNEL    
+      //Engines_Container_i            * _SuperVisionContainer ;
+      //pthread_t                        _MainThreadId ;
       pthread_mutex_t                  _PyMutexWait ;
       pthread_mutex_t                  _MutexWait ;
       pthread_cond_t                   _EventWait ;
       pthread_cond_t                   _JoinWait ;
       bool                             _JustStarted ;
       int                              _Threads ; // Number of threads
+      long                             _CreatedThreads ; 
       int                              _SuspendedThreads ;
       list< char * >                   _EventNodes ;
       list< GraphExecutor::NodeEvent > _Events ;
@@ -111,6 +116,8 @@ namespace GraphExecutor {
       GraphBase::Graph * Graph() const {
                          return _Graph ; } ;
 
+      char * Name() { return Graph()->Name() ; } ;
+
       bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ;
 //      bool LoadXml( const char* myFileName ) ;
       bool LoadInfo( const GraphBase::SNode &aDataFlowInfo ) ;
@@ -140,8 +147,6 @@ namespace GraphExecutor {
                             return _Executable ; } ;
 
       bool Run( const bool AndSuspend ) ;
-      bool Run( const char * aNodeName , const char * AtNodeName ,
-                const bool AndSuspend ) ;
 
       void PyInitialized( bool init ) {
            _PyInitialized = init ; } ;
@@ -150,6 +155,9 @@ namespace GraphExecutor {
 
       void CheckAllDone() ;
 
+      // asv : 20.01.05 : changes involved with switching to old (HEAD) KERNEL    
+      //Engines_Container_i * SuperVisionContainer() ;
+      //const pthread_t MainThreadId() const ;
       void PThreadLock( pthread_mutex_t * aMutex , char * errmsg ) ;
       void PThreadUnLock( pthread_mutex_t * aMutex , char * errmsg ) ;
       void PyThreadLock() ;
@@ -167,6 +175,11 @@ namespace GraphExecutor {
                 return _Graph->ThreadNo() ; } ;
       long Thread( const char * NodeName ) ;
 
+      void IncrCreatedThreads() {
+           _CreatedThreads += 1 ; } ;
+      long CreatedThreads() {
+           return _CreatedThreads ; } ;
+
       bool PushEvent( GraphExecutor::InNode * aNode ,
                       GraphExecutor::NodeEvent anEvent ,
                       GraphExecutor::AutomatonState aState ) ;
@@ -213,8 +226,13 @@ namespace GraphExecutor {
       bool Resume() ;
       bool Kill() ;
       bool Stop() ;
-      bool ReRun() ;
-      bool ReStart() ;
+
+      void NodeAborted( const char * aNodeName ) {
+           string aMsg = string( "The node " ) + string( aNodeName ) + " was aborted." ;
+           Graph()->SetMessages( aMsg.c_str() ) ;
+           _NodeAborted = true ; } ;
+      bool IsNodeAborted() {
+           return _NodeAborted ; } ;
 
       bool IsWaiting() ;
       bool IsReady() ;
@@ -230,8 +248,8 @@ namespace GraphExecutor {
       bool IsRunning( const char * NodeName ) ;
       bool IsDone( const char * NodeName ) ;
       bool IsSuspended( const char * NodeName ) ;
-      bool IsDone( const char * NodeName ,
-                   const char * ServiceParameterName ) ;
+      bool PortDone( const char * NodeName ,
+                     const char * ServiceParameterName ) ;
       long LastLevelDone() ;
 
       bool ReadyWait() ;
@@ -243,10 +261,12 @@ namespace GraphExecutor {
       bool DoneWait( const char * NodeName ) ;
       bool SuspendedWait( const char * NodeName ) ;
 
-      const CORBA::Any *GetInData( const char *ToNodeName ,
-                                   const char *ToParameterName ) ;
-      const CORBA::Any *GetOutData( const char *FromNodeName ,
-                                    const char *FromParameterName ) ;
+//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 ) ;
       const long CpuUsed() ;
       const long CpuUsed( const char *aNodeName ) ;
   };