1 // SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : DataFlowExecutor_DataFlow.lxx
27 #ifndef _DATAFLOWEXECUTOR_DATAFLOW_LXX
28 #define _DATAFLOWEXECUTOR_DATAFLOW_LXX
30 #include "DataFlowExecutor_OutNode.hxx"
32 inline bool GraphExecutor::DataFlow::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) {
33 return GraphExecutor::OutNode::LoadDataFlow( aDataFlow ) ;
36 //inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) {
37 // return GraphExecutor::OutNode::LoadXml( myFileName ) ;
40 inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService( const char * aNodeName ) {
41 if ( Graph()->GetGraphNode( aNodeName ) )
42 return Graph()->GetGraphNode( aNodeName )->GetService() ;
46 inline bool GraphExecutor::DataFlow::AddInputData( const char* ToNodeName ,
47 const char* ToParameterName ,
48 const CORBA::Any aValue ) {
51 return Graph()->AddInputData( ToNodeName , ToParameterName , aValue ) ;
54 inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName ,
55 const char* ToParameterName ,
56 const CORBA::Any aValue ) {
59 return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ;
62 inline bool GraphExecutor::DataFlow::IsValid() {
63 return GraphExecutor::OutNode::IsValid() ;
66 inline bool GraphExecutor::DataFlow::IsExecutable() {
67 return GraphExecutor::OutNode::IsExecutable() ;
70 inline bool GraphExecutor::DataFlow::Run( const bool AndSuspend ) {
71 return GraphExecutor::OutNode::Run( AndSuspend ) ;
73 inline bool GraphExecutor::DataFlow::Run( const char * aNodeName ,
74 const char * AtNodeName ,
75 const bool AndSuspend ) {
76 return GraphExecutor::OutNode::Run( aNodeName , AtNodeName , AndSuspend ) ;
79 inline long GraphExecutor::DataFlow::LastLevelDone() {
80 return GraphExecutor::OutNode::LastLevelDone() ;
83 inline long GraphExecutor::DataFlow::Threads() {
84 return GraphExecutor::OutNode::Threads() ;
87 inline bool GraphExecutor::DataFlow::Event( char ** aNodeName ,
88 SUPERV::GraphEvent & anEvent ,
89 SUPERV::GraphState & aState ,
91 return GraphExecutor::OutNode::Event( aNodeName , anEvent , aState , WithWait ) ;
93 inline bool GraphExecutor::DataFlow::EventW( char ** aNodeName ,
94 SUPERV::GraphEvent & anEvent ,
95 SUPERV::GraphState & aState ) {
96 return GraphExecutor::OutNode::EventW( aNodeName , anEvent , aState ) ;
98 inline long GraphExecutor::DataFlow::EventQSize() {
99 return GraphExecutor::OutNode::EventQSize() ;
102 inline void GraphExecutor::DataFlow::State(GraphExecutor::AutomatonState aState ) {
103 GraphExecutor::OutNode::State( aState ) ;
106 inline SUPERV::GraphState GraphExecutor::DataFlow::State() {
107 return GraphExecutor::OutNode::State() ;
110 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
111 const char * aNodeName ) {
112 return GraphExecutor::OutNode::State( aNodeName ) ;
115 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
116 const char * aNodeName ,
117 const char * anOutServiceParameterName ) {
118 return GraphExecutor::OutNode::State( aNodeName ,
119 anOutServiceParameterName ) ;
122 inline long GraphExecutor::DataFlow::Thread() {
123 return GraphExecutor::OutNode::ThreadNo() ;
125 inline long GraphExecutor::DataFlow::Thread( const char * aNodeName ) {
126 return GraphExecutor::OutNode::Thread( aNodeName ) ;
129 inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState() {
130 return GraphExecutor::OutNode::AutomatonState() ;
133 inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState(
134 const char * aNodeName ) {
135 return GraphExecutor::OutNode::AutomatonState( aNodeName ) ;
138 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState() {
139 return GraphExecutor::OutNode::ControlState() ;
142 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState(
143 const char * aNodeName ) {
144 return GraphExecutor::OutNode::ControlState( aNodeName ) ;
147 inline void GraphExecutor::DataFlow::ControlClear() {
148 return GraphExecutor::OutNode::ControlClear() ;
151 inline void GraphExecutor::DataFlow::ControlClear(
152 const char * aNodeName ) {
153 return GraphExecutor::OutNode::ControlClear( aNodeName ) ;
156 inline bool GraphExecutor::DataFlow::IsWaiting() {
157 return GraphExecutor::OutNode::IsWaiting() ;
159 inline bool GraphExecutor::DataFlow::IsReady() {
160 return GraphExecutor::OutNode::IsReady() ;
162 inline bool GraphExecutor::DataFlow::IsRunning() {
163 return GraphExecutor::OutNode::IsRunning() ;
165 inline bool GraphExecutor::DataFlow::IsDone() {
166 return GraphExecutor::OutNode::IsDone() ;
168 inline bool GraphExecutor::DataFlow::IsSuspended() {
169 return GraphExecutor::OutNode::IsSuspended() ;
172 inline bool GraphExecutor::DataFlow::IsWaiting(const char * aNodeName ) {
173 return GraphExecutor::OutNode::IsWaiting( aNodeName ) ;
175 inline bool GraphExecutor::DataFlow::IsReady(const char * aNodeName ) {
176 return GraphExecutor::OutNode::IsReady( aNodeName ) ;
178 inline bool GraphExecutor::DataFlow::IsRunning(const char * aNodeName ) {
179 return GraphExecutor::OutNode::IsRunning( aNodeName ) ;
181 inline bool GraphExecutor::DataFlow::IsDone(const char * aNodeName ) {
182 return GraphExecutor::OutNode::IsDone( aNodeName ) ;
184 inline bool GraphExecutor::DataFlow::IsSuspended(const char * aNodeName ) {
185 return GraphExecutor::OutNode::IsSuspended( aNodeName ) ;
188 inline bool GraphExecutor::DataFlow::IsDone(
189 const char * aNodeName ,
190 const char * anOutServiceParameterName ) {
191 return GraphExecutor::OutNode::IsDone( aNodeName ,
192 anOutServiceParameterName ) ;
195 inline bool GraphExecutor::DataFlow::ReadyWait() {
196 return GraphExecutor::OutNode::ReadyWait() ;
198 inline bool GraphExecutor::DataFlow::RunningWait() {
199 return GraphExecutor::OutNode::RunningWait() ;
201 inline bool GraphExecutor::DataFlow::DoneWait() {
202 return GraphExecutor::OutNode::DoneWait() ;
204 inline bool GraphExecutor::DataFlow::SuspendedWait() {
205 return GraphExecutor::OutNode::SuspendedWait() ;
208 inline bool GraphExecutor::DataFlow::ReadyWait(const char * aNodeName ) {
209 return GraphExecutor::OutNode::ReadyWait( aNodeName ) ;
211 inline bool GraphExecutor::DataFlow::RunningWait(const char * aNodeName ) {
212 return GraphExecutor::OutNode::RunningWait( aNodeName ) ;
214 inline bool GraphExecutor::DataFlow::DoneWait(const char * aNodeName ) {
215 return GraphExecutor::OutNode::DoneWait( aNodeName ) ;
217 inline bool GraphExecutor::DataFlow::SuspendedWait(const char * aNodeName ) {
218 return GraphExecutor::OutNode::SuspendedWait( aNodeName ) ;
221 inline const CORBA::Any *GraphExecutor::DataFlow::GetInData(
222 const char * ToNodeName ,
223 const char * ToParameterName ) {
224 return GraphExecutor::OutNode::GetInData( ToNodeName ,
227 inline const CORBA::Any *GraphExecutor::DataFlow::GetOutData(
228 const char * FromNodeName ,
229 const char * FromParameterName ) {
230 return GraphExecutor::OutNode::GetOutData( FromNodeName ,
231 FromParameterName ) ;