src/GraphExecutor/DataFlowExecutor_DataFlow.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   : DataFlowExecutor_DataFlow.hxx
00025 //  Module : SUPERV
00026 
00027 #ifndef _DATAFLOWEXECUTOR_DATAFLOW_HXX
00028 #define _DATAFLOWEXECUTOR_DATAFLOW_HXX
00029 
00030 #include "DataFlowExecutor_OutNode.hxx"
00031 
00032 namespace GraphExecutor {
00033 
00034   class DataFlow : public GraphExecutor::OutNode {
00035     
00036     private :
00037 
00038       SALOME_NamingService* _theNamingService ;
00039 
00040     public:
00041 
00042       DataFlow();
00043       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
00044                 const char * DataFlowName ,
00045                 const char * DebugFileName ,
00046                 const SUPERV::KindOfNode aKindOfNode );
00047       DataFlow( CORBA::ORB_ptr ORB, SALOME_NamingService* ptrNamingService ,
00048                 const SALOME_ModuleCatalog::Service& DataFlowService ,
00049                 const char *DataFlowComponentName ,
00050                 const char *DataFlowInterfaceName ,
00051                 const char *DataFlowName ,
00052                 const SUPERV::KindOfNode DataFlowkind = SUPERV::ComputingNode ,
00053                 const SUPERV::SDate DataFlowFirstCreation = SUPERV::SDate() ,
00054                 const SUPERV::SDate DataFlowLastModification = SUPERV::SDate() ,
00055                 const char * DataFlowEditorRelease = NULLSTRING ,
00056                 const char * DataFlowAuthor = NULLSTRING ,
00057                 const char * DataFlowComputer = NULLSTRING ,
00058                 const char * DataFlowComment = NULLSTRING ,
00059                 const char * DebugFileName = NULLSTRING ) ;
00060       virtual ~DataFlow();
00061 
00062       bool LoadDataFlow( const GraphBase::SGraph * aDataFlow ) ;
00063 //      bool LoadXml( const char* myFileName ) ;
00064 
00065       const SALOME_ModuleCatalog::Service * NodeService( const char * NodeName ) ;
00066 
00067       bool AddInputData( const char * ToNodeName ,
00068                          const char * ToParameterName ,
00069                          const CORBA::Any aValue = CORBA::Any() ) ;
00070       bool ChangeInputData( const char * ToNodeName ,
00071                             const char * ToParameterName ,
00072                             const CORBA::Any aValue = CORBA::Any() ) ;
00073       bool InputOfAny( const char * ToServiceParameterName ,
00074                        const CORBA::Any & aValue ,
00075                        const bool SomeDataReady = true ) ;
00076 
00077       bool OutputOfAny( const char * aNodeName ,
00078                         const char * ToServiceParameterName ,
00079                         const CORBA::Any & aValue ) ;
00080 
00081       bool IsValid() ;
00082       bool IsExecutable() ;
00083 
00084       bool Run( const bool AndSuspend ) ;
00085 
00086       long LastLevelDone() ;
00087 
00088       void State(GraphExecutor::AutomatonState aState ) ;
00089       SUPERV::GraphState State() ;
00090       SUPERV::GraphState State(const char * aNodeName ) ;
00091       SUPERV::GraphState State( const char * aNodeName ,
00092                                  const char * anOutServiceParameterName ) ;
00093 
00094       long Thread() ;
00095       long Thread(const char * aNodeName ) ;
00096 
00097       GraphExecutor::AutomatonState AutomatonState() ;
00098       GraphExecutor::AutomatonState AutomatonState(const char * aNodeName ) ;
00099 
00100       SUPERV::ControlState ControlState() ;
00101       SUPERV::ControlState ControlState(const char * aNodeName ) ;
00102       void ControlClear() ;
00103       void ControlClear(const char * aNodeName ) ;
00104 
00105       bool Event( char ** aNodeName ,
00106                   SUPERV::GraphEvent & anEvent ,
00107                   SUPERV::GraphState & aState ,
00108                   bool WithWait = true ) ;
00109       bool EventW( char ** aNodeName ,
00110                    SUPERV::GraphEvent & anEvent ,
00111                    SUPERV::GraphState & aState ) ;
00112       long EventQSize() ;
00113 
00114       bool IsWaiting() ;
00115       bool IsReady() ;
00116       bool IsRunning() ;
00117       bool IsDone() ;
00118       bool IsSuspended() ;
00119       bool IsWaiting(const char * aNodeName ) ;
00120       bool IsReady(const char * aNodeName ) ;
00121       bool IsRunning(const char * aNodeName ) ;
00122       bool IsDone(const char * aNodeName ) ;
00123       bool IsSuspended(const char * aNodeName ) ;
00124       bool PortDone( const char * aNodeName ,
00125                      const char * anOutServiceParameterName ) ;
00126 
00127 //JR 30.03.2005      const CORBA::Any *GetInData( const char * ToNodeName ,
00128       const CORBA::Any GetInData( const char * ToNodeName ,
00129                                   const char * ToParameterName ) ;
00130 //JR 30.03.2005      const CORBA::Any *GetOutData( const char * FromNodeName ,
00131       const CORBA::Any GetOutData( const char * FromNodeName ,
00132                                    const char * FromParameterName ) ;
00133 
00134       long Threads() ;
00135 
00136       bool ReadyWait() ;
00137       bool RunningWait() ;
00138       bool DoneWait() ;
00139       bool SuspendedWait() ;
00140       bool ReadyWait(const char * aNodeName ) ;
00141       bool RunningWait(const char * aNodeName ) ;
00142       bool DoneWait(const char * aNodeName ) ;
00143       bool SuspendedWait(const char * aNodeName ) ;
00144 
00145       bool Ping(const char * aNodeName ) ;
00146       bool ContainerKill() ;
00147       bool ContainerKill(const char * aNodeName ) ;
00148 
00149       bool Kill() ;
00150       bool Kill(const char * aNodeName ) ;
00151       bool KillDone(const char * aNodeName ) ;
00152       bool Suspend() ;
00153       bool Suspend(const char * aNodeName ) ;
00154       bool SuspendDone() ;
00155       bool SuspendDone(const char * aNodeName ) ;
00156       bool Resume() ;
00157       bool Resume(const char * aNodeName ) ;
00158       bool Stop() ;
00159       bool Stop(const char * aNodeName ) ;
00160 
00161   };
00162 
00163 };
00164 
00165 #include "DataFlowExecutor_DataFlow.lxx"
00166 
00167 ostream & operator << (ostream &,const GraphExecutor::DataFlow & G);
00168 ostream & operator << (ostream &,const SUPERV::SDate &);
00169 
00170 #endif
00171 
00172 
00173