src/GraphExecutor/DataFlowExecutor_InNode.hxx

Go to the documentation of this file.
00001 //  SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton
00002 //
00003 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00005 // 
00006 //  This library is free software; you can redistribute it and/or 
00007 //  modify it under the terms of the GNU Lesser General Public 
00008 //  License as published by the Free Software Foundation; either 
00009 //  version 2.1 of the License. 
00010 // 
00011 //  This library is distributed in the hope that it will be useful, 
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00014 //  Lesser General Public License for more details. 
00015 // 
00016 //  You should have received a copy of the GNU Lesser General Public 
00017 //  License along with this library; if not, write to the Free Software 
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00019 // 
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //
00023 //
00024 //  File   : DataFlowBase_InNode.hxx
00025 //  Author : Jean Rahuel, CEA
00026 //  Module : SUPERV
00027 //  $Header:
00028 
00029 #ifndef _DATAFLOWEXECUTOR_INNODE_HXX
00030 #define _DATAFLOWEXECUTOR_INNODE_HXX
00031 
00032 #include <stdio.h>
00033 
00034 #include <Python.h>
00035 
00036 #include "SALOME_Container_i.hxx"
00037 
00038 #include "DataFlowBase_Graph.hxx"
00039 #include "DataFlowBase_FactoryNode.hxx"
00040 #include "DataFlowBase_GOTONode.hxx"
00041 #include "DataFlowBase_LoopNode.hxx"
00042 #include "DataFlowBase_EndOfLoopNode.hxx"
00043 #include "DataFlowBase_SwitchNode.hxx"
00044 #include "DataFlowBase_EndOfSwitchNode.hxx"
00045 
00046 #include "DataFlowExecutor_FiniteStateMachine.hxx"
00047 
00048 #define MAXSTACKTHREADSIZE 127
00049 
00050 void * run_function(void *p);
00051 
00052 extern GraphExecutor::FiniteStateMachine * theAutomaton ;
00053 
00054 extern "C" PyObject * PyRunMethod( PyObject * dummy , PyObject * args ) ;
00055 
00056 namespace GraphExecutor {
00057 
00058   struct ServicesAnyData {
00059     string     Name;
00060     CORBA::Any Value;
00061   };
00062 
00063   class OutNode ;
00064 
00065 //  class InNode : public GraphBase::Node {
00066   class InNode : public GraphBase::Base {
00067 
00068     private:
00069 
00070       GraphBase::ComputingNode       * _ComputingNode ;
00071       GraphBase::FactoryNode         * _FactoryNode ;
00072       GraphBase::InLineNode          * _InLineNode ;
00073       GraphBase::GOTONode            * _GOTONode ;
00074       GraphBase::LoopNode            * _LoopNode ;
00075       GraphBase::EndOfLoopNode       * _EndOfLoopNode ;
00076       GraphBase::SwitchNode          * _SwitchNode ;
00077       GraphBase::EndOfSwitchNode     * _EndOfSwitchNode ;
00078       GraphBase::Graph               * _GraphMacroNode ;
00079 
00080       PyObject                       * _MyPyRunMethod ;
00081 
00082       bool                             _createNewThread ;
00083 //JR 15.04.2005 Debug PAL8624 RetroConception :
00084 //      bool                             _createNewThreadIf ;
00085       int                              _RewindStack ;
00086       GraphExecutor::AutomatonState    _OldState ;
00087       GraphExecutor::AutomatonState    _currentState ;
00088       GraphExecutor::NodeEvent         _CurrentEvent ;
00089       SUPERV::ControlState             _ControlState ;
00090       GraphExecutor::AutomatonState    _NextState ;
00091       GraphExecutor::StateEventAction  _NextAction ;
00092 
00093       pthread_mutex_t                  _MutexDataReady ;
00094       bool                             _MutexDataReadyLocked ;
00095       bool                             _HasAllDataReady ;
00096 
00097       bool                             _PyFuncRunned ;
00098       bool                             _Loading ;
00099     
00100 //JR 15.04.2005 Debug PAL8624 RetroConception :
00101 //      pthread_mutex_t                  _MutexDataWait ;
00102 //      bool                             _DataWait ;
00103 
00104       pthread_mutex_t                  _MutexWait ;
00105 
00106       pthread_cond_t                   _ReadyWait ;
00107       pthread_cond_t                   _RunningWait ;
00108       pthread_cond_t                   _DoneWait ;
00109       pthread_cond_t                   _SuspendedWait ;
00110 
00111       pthread_cond_t                   _SuspendWait ;
00112       bool                             _SuspendSync ;
00113       pthread_cond_t                   _ResumeWait ;
00114       bool                             _ResumeSync ;
00115       GraphExecutor::NodeEvent         _aResumeEvent ;
00116       GraphExecutor::InNode *          _aReStartNode ;
00117       GraphExecutor::NodeEvent         _aReStartEvent ;
00118 
00119       pthread_cond_t                   _KillWait ;
00120       bool                             _KillSync ;
00121       pthread_cond_t                   _StopWait ;
00122 
00123       pthread_cond_t                   _ThreadStartedWait ;
00124       bool                             _ThreadStartedSync ;
00125 
00126       pthread_t                        _Pythread ;
00127       long                             _PyCpuUsed ;
00128       long                             _PyTotCpuUsed ;
00129 
00130       GraphExecutor::FiniteStateMachine * _Automaton ;
00131     
00132       CORBA::ORB_ptr                    _Orb;
00133 
00134       GraphExecutor::OutNode          * _OutNode ;
00135 
00136       char                            * _DataFromNode ;
00137       bool                              _InitLoop ;
00138 
00139     public:
00140 
00141       InNode() ;
00142       InNode( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService,
00143               const SALOME_ModuleCatalog::Service& NodeService ,
00144               const char *NodeComponentName ,
00145               const char* NodeInterfaceName ,
00146               const char *NodeName ,
00147               const SUPERV::KindOfNode akind = SUPERV::ComputingNode ,
00148               GraphBase::ListOfFuncName aFuncName = GraphBase::ListOfFuncName() ,
00149               GraphBase::ListOfPythonFunctions aPythonFunction = GraphBase::ListOfPythonFunctions() ,
00150               const SUPERV::SDate NodeFirstCreation = SUPERV::SDate() ,
00151               const SUPERV::SDate NodeLastModification = SUPERV::SDate() ,
00152               const char * NodeEditorRelease = NULLSTRING ,
00153               const char * NodeAuthor = NULLSTRING ,
00154               const char * NodeComputer = NULLSTRING ,
00155               const char * NodeComment = NULLSTRING ,
00156               const bool   GeneratedName = false ,
00157               const int NodeX = 0 ,
00158               const int NodeY = 0 ,
00159               int * Graph_prof_debug = NULL ,
00160               ofstream * Graph_fdebug = NULL ) ;
00161       virtual ~InNode() ;
00162 
00163       pthread_t ThreadNo() {
00164                 return _ComputingNode->ThreadNo() ; } ;
00165       void ThreadNo( pthread_t aThread ) {
00166            _ComputingNode->ThreadNo ( aThread ) ; } ;
00167 
00168       char * Name() const {
00169              return _ComputingNode->Name() ; } ;
00170       const char *const * NamePtr() const {
00171                           return _ComputingNode->NamePtr() ; } ;
00172       SUPERV::KindOfNode Kind() const {
00173                          return _ComputingNode->Kind() ; } ;
00174       const bool IsComputingNode() const {
00175                  return _ComputingNode->IsComputingNode() ; } ;
00176       const bool IsFactoryNode() const {
00177                  return _ComputingNode->IsFactoryNode() ; } ;
00178       const bool IsInLineNode() const {
00179                  return _ComputingNode->IsInLineNode() ; } ;
00180       const bool IsOneOfInLineNodes() const {
00181                  return _ComputingNode->IsOneOfInLineNodes() ; } ;
00182       const bool IsOneOfGOTONodes() const {
00183                  return _ComputingNode->IsOneOfGOTONodes() ; } ;
00184       const bool IsMacroNode() const {
00185                  return _ComputingNode->IsMacroNode() ; } ;
00186       const bool IsDataFlowNode() const {
00187                  return _ComputingNode->IsDataFlowNode() ; } ;
00188       const bool IsDataStreamNode() const {
00189                  return _ComputingNode->IsDataStreamNode() ; } ;
00190       const bool IsLoopNode() const {
00191                  return _ComputingNode->IsLoopNode() ; } ;
00192       const bool IsEndLoopNode() const {
00193                  return _ComputingNode->IsEndLoopNode() ; } ;
00194       const bool IsSwitchNode() const {
00195                  return _ComputingNode->IsSwitchNode() ; } ;
00196       const bool IsEndSwitchNode() const {
00197                  return _ComputingNode->IsEndSwitchNode() ; } ;
00198       const bool IsGOTONode() const {
00199                  return _ComputingNode->IsGOTONode() ; } ;
00200       const bool IsHeadNode() const {
00201                  return _ComputingNode->IsHeadNode() ; } ;
00202       GraphBase::ComputingNode * ComputingNode() {
00203                                  return _ComputingNode ; } ;
00204       GraphBase::FactoryNode * FactoryNode() {
00205                                  return _FactoryNode ; } ;
00206       GraphBase::GOTONode * GOTONode() {
00207                             if ( _GOTONode )
00208                               return _GOTONode ;
00209                             if ( _LoopNode )
00210                               return _LoopNode ;
00211                             if ( _EndOfLoopNode )
00212                               return _EndOfLoopNode ;
00213                             if ( _SwitchNode )
00214                               return _SwitchNode ;
00215                             if ( _EndOfSwitchNode )
00216                               return _EndOfSwitchNode ;
00217                             return NULL ;
00218                             } ;
00219       GraphBase::InLineNode * InLineNode() {
00220                               GraphBase::InLineNode * aNode = GOTONode() ;
00221                               if ( aNode == NULL )
00222                                 return _InLineNode ;
00223                               return aNode ;
00224                               } ;
00225       GraphBase::LoopNode * LoopNode() {
00226                             return _LoopNode ; } ;
00227       GraphBase::Graph * GraphMacroNode() {
00228                          return _GraphMacroNode ; } ;
00229 
00230       SUPERV::CNode_var ObjRef() const { return _ComputingNode->ObjRef() ; } ;
00231       void SetObjRef( SUPERV::CNode_var aNode ) {
00232                      _ComputingNode->SetObjRef( aNode ) ; } ;
00233 
00234       CNode_Impl * ObjImpl() const { return _ComputingNode->ObjImpl() ; } ;
00235       void SetObjImpl( CNode_Impl * aGraph ) {
00236                        _ComputingNode->SetObjImpl( aGraph ) ; } ;
00237 
00238       Engines::Component_var Component() const ;
00239       Engines::Container_var Container() const ;
00240       void SetContainer(Engines::Container_var aContainer) {
00241                         _FactoryNode->SetContainer( aContainer ) ; } ;
00242       void SetComponent(Engines::Component_var anObjComponent) {
00243                         _FactoryNode->SetComponent( anObjComponent ) ; } ;
00244       void ObjInterface( bool k_interface ) {
00245                         _ComputingNode->ObjInterface( k_interface ) ; } ;
00246       bool ObjInterface() {
00247                         return _FactoryNode->ObjInterface() ; } ;
00248       char * ComponentName() const { return _FactoryNode->ComponentName() ; } ;
00249       char * InterfaceName() const { return _FactoryNode->InterfaceName() ; } ;
00250       char * Computer() const { return _FactoryNode->Computer() ; } ;
00251       const char * ServiceName() const {
00252                    return _ComputingNode->ServiceName() ; } ;
00253       const SALOME_ModuleCatalog::ListOfServicesParameter ServiceInParameter() const {
00254             return _ComputingNode->ServiceInParameter() ; } ;
00255       const SALOME_ModuleCatalog::ListOfServicesParameter ServiceOutParameter() const {
00256             return _ComputingNode->ServiceOutParameter() ; } ;
00257 
00258       void CoupledNode( GraphBase::InLineNode * aCoupledNode ) {
00259            GOTONode()->CoupledNode( aCoupledNode ) ; } ;
00260       GraphBase::InLineNode * CoupledNode() {
00261                               return GOTONode()->CoupledNode() ; } ;
00262 
00263       GraphBase::InPort * AddInPort( const char * InputParameterName ,
00264                                      const char * InputParameterType ,
00265                                      const SUPERV::KindOfPort aKindOfPort ) {
00266                           return _ComputingNode->AddInPort( InputParameterName ,
00267                                                             InputParameterType ,
00268                                                             aKindOfPort ) ; } ;
00269       GraphBase::OutPort * AddOutPort( const char * OutputParameterName ,
00270                                        const char * OutputParameterType ,
00271                                        const SUPERV::KindOfPort aKindOfPort ) {
00272                            return _ComputingNode->AddOutPort( OutputParameterName ,
00273                                                               OutputParameterType ,
00274                                                               aKindOfPort ) ; } ;
00275 //      void InOutPort( GraphBase::InPort * InputPort ,
00276 //                      GraphBase::OutPort * OutputPort ) {
00277 //           return _ComputingNode->InOutPort( InputPort , OutputPort ) ; } ;
00278       int LinkedNodesSize() const {
00279           return _ComputingNode->LinkedNodesSize() ; } ;
00280 //      GraphBase::ComputingNode * LinkedNodes( int i ) const {
00281       GraphBase::StreamNode * LinkedNodes( int i ) const {
00282                               return _ComputingNode->LinkedNodes( i ) ; } ;
00283       const int LinkedInPortsNumber( int i ) const {
00284                 return _ComputingNode->LinkedInPortsNumber( i ) ; } ;
00285 
00286       const int GetNodeInPortsSize() const {
00287                 return _ComputingNode->GetNodeInPortsSize() ; } ;
00288       const GraphBase::InPort *GetNodeInLoop() const {
00289                               return _ComputingNode->GetNodeInLoop() ; } ;
00290       const GraphBase::InPort *GetNodeInGate() const {
00291                               return _ComputingNode->GetNodeInGate() ; } ;
00292       const GraphBase::InPort *GetNodeInPort(int i) const {
00293                               return _ComputingNode->GetNodeInPort( i ) ; } ;
00294       GraphBase::InPort *GetChangeNodeInLoop() const {
00295                         return _ComputingNode->GetChangeNodeInLoop() ; } ;
00296       GraphBase::InPort *GetChangeNodeInGate() const {
00297                         return _ComputingNode->GetChangeNodeInGate() ; } ;
00298       GraphBase::InPort *GetChangeNodeInPort(int i) const {
00299                         return _ComputingNode->GetChangeNodeInPort( i ) ; } ;
00300       const int GetNodeOutPortsSize() const {
00301                 return _ComputingNode->GetNodeOutPortsSize() ; } ;
00302       const GraphBase::OutPort *GetNodeOutLoop() const {
00303                                return _ComputingNode->GetNodeOutLoop() ; } ;
00304       const GraphBase::OutPort *GetNodeOutGate() const {
00305                                return _ComputingNode->GetNodeOutGate() ; } ;
00306       const GraphBase::OutPort *GetNodeOutPort(int i) const {
00307                                return _ComputingNode->GetNodeOutPort( i ) ; } ;
00308       GraphBase::OutPort *GetChangeNodeOutLoop() const {
00309                          return _ComputingNode->GetChangeNodeOutLoop() ; } ;
00310       GraphBase::OutPort *GetChangeNodeOutGate() const {
00311                          return _ComputingNode->GetChangeNodeOutGate() ; } ;
00312       GraphBase::OutPort *GetChangeNodeOutPort(int i) const {
00313                          return _ComputingNode->GetChangeNodeOutPort( i ) ; } ;
00314 
00315       const GraphBase::InPort *GetInPort( const char *name ) {
00316             return _ComputingNode->GetInPort( name ) ; } ;
00317       const GraphBase::OutPort *GetOutPort( const char *name ) {
00318             return _ComputingNode->GetOutPort( name ) ; } ;
00319       GraphBase::InPort *GetChangeInPort( const char *name ) {
00320                         return _ComputingNode->GetChangeInPort( name ) ; } ;
00321       GraphBase::OutPort *GetChangeOutPort( const char *name ) {
00322                          return _ComputingNode->GetChangeOutPort( name ) ; } ;
00323 
00324       void PyFuncRunned( bool arunned ) {
00325            _PyFuncRunned = arunned ; } ;
00326       bool PyFuncRunned() {
00327            return _PyFuncRunned ; } ;
00328 
00329       void OutNode( GraphExecutor::OutNode * theOutNode ) {
00330            _OutNode = theOutNode ; } ;
00331 
00332       bool InitPython() ;
00333       PyObject * InitPyDynInvoke( char * PyFuncName ,
00334                                   const SUPERV::ListOfStrings * aPythonFunction ,
00335                                   bool & Err ) ;
00336       void RemovePyDynInvoke( char * PyFuncName ) ;
00337 
00338 //JR 15.04.2005 Debug PAL8624 RetroConception :
00339 //      void LockDataWait() ;
00340 //      void UnLockDataWait() ;
00341 //      bool IsLockedDataWait() { return _DataWait ; } ;
00342       void LockDataReady() ;
00343       void UnLockDataReady() ;
00344       void HasAllDataReady( bool hasAllDataReady ) {
00345 //           cdebug << "Executor::InNode::HasAllDataReady( " << hasAllDataReady
00346 //                  << " ) " << Name() << " previous _HasAllDataReady " << _HasAllDataReady
00347 //                  << endl ;
00348            _HasAllDataReady = hasAllDataReady ; } ;
00349       bool HasAllDataReady() const {
00350            return _HasAllDataReady ; }
00351 
00352       bool Ping() ;
00353       bool ContainerKill() ;
00354 
00355       bool Kill() ;
00356       bool KillDone() ;
00357       bool Suspend() ;
00358       bool SuspendDone() ;
00359       bool Resume() ;
00360       bool Stop() ;
00361 
00362       void CreateNewThread( bool k_create ) {
00363 //           cdebug << Name() << " CreateNewThread " << k_create << endl ;
00364            _createNewThread = k_create ; } ;
00365 //JR 15.04.2005 Debug PAL8624 RetroConception :
00366 //      void CreateNewThreadIf( bool k_create ) {
00367 //           cdebug << Name() << " CreateNewThreadIf( " << k_create << " )" << endl ;
00368 //           _createNewThreadIf = k_create ; } ;
00369       bool CreateNewThread() { return _createNewThread ; } ;
00370 //      bool CreateNewThreadIf() { return _createNewThreadIf ; } ;
00371       void NewThread( pthread_t aThread ) ;
00372       void ExitThread() ;
00373       void RewindStack( int aRewindStack ) { _RewindStack = aRewindStack ; } ;
00374       int RewindStack() const { return _RewindStack ; } ;
00375 
00376       GraphExecutor::AutomatonState State() const {
00377              return _currentState; };
00378       void State(GraphExecutor::AutomatonState aState ) {
00379 //           cdebug << "GraphExecutor::InNode::State( "
00380 //                  << Automaton()->StateName( _currentState ) << " --> "
00381 //                  << Automaton()->StateName( aState ) << " )"  << endl ;
00382            _currentState = aState ; } ;
00383       SUPERV::ControlState ControlState() const {
00384              return _ControlState; };
00385       void ControlState(SUPERV::ControlState aControlState ) {
00386            _ControlState = aControlState ; } ;
00387       void ControlClear() {
00388            _ControlState = SUPERV::VoidState ; } ;
00389 
00390       void SetAutomaton() {
00391             _Automaton = theAutomaton ; } ;
00392       GraphExecutor::FiniteStateMachine * Automaton() const {
00393             return _Automaton ; } ;
00394 
00395       bool IsWaiting() ;
00396       bool IsReady() ;
00397       bool IsRunning() ;
00398       bool IsDone() ;
00399       bool IsSuspended() ;
00400       bool IsKilled() ;
00401       bool IsStopped() ;
00402       void IsLoading( bool Loading );
00403       bool IsLoading() { return _Loading ; } ;
00404 
00405       bool StateWait( SUPERV::GraphState aState ) ;
00406       bool ReadyWait() ;
00407       bool RunningWait() ;
00408       bool DoneWait() ;
00409       bool SuspendedWait() ;
00410 
00411       void InitialState() ;
00412       bool InitPythonFunctions(bool WithErr ) ;
00413       void SetWaitingStates(GraphExecutor::InNode * EndNode ) ;
00414 
00415       int SendEvent(const GraphExecutor::NodeEvent anEvent ) ;
00416       void DataFromNode( char * FromNodeName ) {
00417            _DataFromNode = FromNodeName ; } ;
00418       const char * DataFromNode() const { return _DataFromNode ; } ;
00419 
00420       int ErrorAction();
00421       int VoidAction();
00422       void ReadyAction() ;
00423       void RunningAction() ;
00424       void DoneAction() ;
00425       void SuspendedAction() ;
00426       GraphExecutor::InNode * SuspendAction() ;
00427       bool ResumeAction(GraphExecutor::NodeEvent aResumeEvent ) ;
00428       bool ReStartAction( GraphExecutor::InNode * aRestartNode ,
00429                           GraphExecutor::NodeEvent anEvent ) ;
00430       void KillAction() ;
00431       void KilledAction() ;
00432       void ThreadStartAction() ;
00433       void ThreadStartedAction() ;
00434       void StopAction() ;
00435       void StoppedAction() ;
00436       int executeAction() ; // New Thread or Same Thread
00437       int ExecuteAction() ;
00438 
00439       int DataWaiting_SomeDataReadyAction() ;
00440       int DataUndef_NotAllDataReadyAction() ;
00441       int DataUndef_AllDataReadyAction() ;
00442       int DataReady_SuspendAction() ;
00443       int SuspendedReady_ResumeAction() ;
00444       int DataReady_KillAction() ;
00445       int DataReady_StopAction() ;
00446       int DataReady_ExecuteAction() ;
00447       int DataReady_ExecuteActionInLineNodes( ServicesAnyData * InParametersList ,
00448                                               ServicesAnyData * OutParametersList ) ;      int DataReady_ExecuteActionLoopNodes( ServicesAnyData * InParametersList ,
00449                                             ServicesAnyData * OutParametersList ,
00450                                             bool & CopyInOut ) ;
00451       void DynInvoke( Engines::Component_ptr obj,
00452                 const char *method, 
00453                 ServicesAnyData * inParams, int nInParams,
00454                 ServicesAnyData * outParams, int nOutParams) ;
00455       void DynInvoke( Engines::Component_ptr obj,
00456                    const char *method, 
00457                    const char * aGraphName ,
00458                    const char * aNodeName );
00459       bool PyDynInvoke( PyObject * MyPyRunMethod ,
00460                      const char *method , 
00461                      ServicesAnyData * inParams , int nInParams ,
00462                      ServicesAnyData * outParams, int nOutParams ) ;
00463 
00464       int Executing_SuspendAction() ;
00465       int SuspendedExecuting_ResumeAction() ;
00466       int Executing_KillAction() ;
00467       int Executing_StopAction() ;
00468       int Executing_SuccessAction() ;
00469 //      int Executing_ErrorAction() ;
00470       int Errored_ExecutingAction() ;
00471       int Successed_SuccessAction() ;
00472       bool SendSomeDataReady( char * FromNodeName ) ;
00473       int Errored_ErrorAction() ;
00474       int Successed_SuspendAction() ;
00475       int Errored_SuspendAction() ;
00476       int SuspendedSuccessed_ResumeAction() ;
00477       int SuspendedErrored_ResumeAction() ;
00478       int Successed_KillAction() ;
00479       int Errored_KillAction() ;
00480       int Successed_StopAction() ;
00481       int Errored_StopAction() ;
00482       int SuspendedSuccessed_ReStartAction() ;
00483       int SuspendedErrored_ReStartAction() ;
00484       int SuspendedSuccessed_ReStartAndSuspendAction() ;
00485       int SuspendedErrored_ReStartAndSuspendAction() ;
00486 
00487       void InParametersSet( bool & Err ,
00488                             int  nInParams ,
00489                             ServicesAnyData * InParametersList ) ;
00490       void InOutParametersSet( int nOutParams ,
00491                                ServicesAnyData * OutParametersList ) ;
00492       bool OutParametersSet( bool Err , SUPERV::GraphState PortState ,
00493                              int nOutParams ,
00494                              ServicesAnyData * OutParametersList ) ;
00495       void SetOutPortsOfInportsOfEndSwitch( GraphBase::OutPort * anOutPort ,
00496                                             const char * anEndSwitchNodeName ) ;
00497       void coutbegin() ;
00498       void coutexit() ;
00499 
00500       const long CpuUsed( bool tot = false ) ;
00501 
00502       long PyCpuUsed( bool tot = false ) ;
00503       void SetPyCpuUsed() ;
00504       long PyCpu() ;
00505 
00506       bool PyRunSimpleString( char* thePyString );
00507       PyObject * PyEvalCallObject( const char *method ,
00508                                    PyObject * MyPyRunMethod ,
00509                                    PyObject * ArgsList ) ;
00510     } ;
00511 
00512 } ;
00513 
00514 
00515 #endif
00516