Salome HOME
2cf8cf4c03ab43f0b2550e5dc881c6789c4d6039
[modules/superv.git] / src / GraphExecutor / DataFlowExecutor_DataFlow.lxx
1 //  SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
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. 
10 // 
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. 
15 // 
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 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : DataFlowExecutor_DataFlow.lxx
25 //  Module : SUPERV
26
27 #ifndef _DATAFLOWEXECUTOR_DATAFLOW_LXX
28 #define _DATAFLOWEXECUTOR_DATAFLOW_LXX
29
30 #include "DataFlowExecutor_OutNode.hxx"
31
32 inline bool GraphExecutor::DataFlow::LoadDataFlow(
33        const GraphBase::SGraph &aDataFlow ) {
34   return GraphExecutor::OutNode::LoadDataFlow( aDataFlow ) ; 
35 }
36
37 inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) {
38   return GraphExecutor::OutNode::LoadXml( myFileName ) ; 
39 }
40
41 inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService(
42                                              const char * aNodeName ) {
43   if ( Graph()->GetGraphNode( aNodeName ) )
44     return Graph()->GetGraphNode( aNodeName )->GetService() ;
45   return NULL ;
46 }
47
48 inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName ,
49                                                  const char* ToParameterName ,
50                                                  const CORBA::Any aValue ) {
51   if ( !IsValid() )
52     return false ;
53   return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ; 
54 } ;
55
56 inline bool GraphExecutor::DataFlow::AddInputSharedData(const char* ToNodeName1 ,
57                                                       const char* ToParameterName1 ,
58                                                       const char* ToNodeName2 ,
59                                                       const char* ToParameterName2 ) {
60   if ( !IsValid() )
61     return false ;
62   return GraphExecutor::OutNode::AddInputData( ToNodeName1 ,
63                                                ToParameterName1 ,
64                                                ToNodeName2 ,
65                                                ToParameterName2 ) ;
66 //                                         aKindOfPortValue ) ; 
67 } ;
68
69 inline bool GraphExecutor::DataFlow::IsValid() {
70   return GraphExecutor::OutNode::IsValid() ;
71 }
72
73 inline bool GraphExecutor::DataFlow::IsExecutable() {
74   return GraphExecutor::OutNode::IsExecutable() ;
75 }
76
77 inline bool GraphExecutor::DataFlow::Run( const bool AndSuspend ) {
78   return GraphExecutor::OutNode::Run( AndSuspend ) ;
79 }
80 inline bool GraphExecutor::DataFlow::Run( const char * aNodeName ,
81                                           const char * AtNodeName ,
82                                           const bool AndSuspend ) {
83   return GraphExecutor::OutNode::Run( aNodeName ,  AtNodeName , AndSuspend ) ;
84 }
85
86 inline long GraphExecutor::DataFlow::LastLevelDone() {
87   return GraphExecutor::OutNode::LastLevelDone() ;
88 }
89
90 inline long GraphExecutor::DataFlow::Threads() {
91   return GraphExecutor::OutNode::Threads() ;
92 }
93
94 inline bool GraphExecutor::DataFlow::Event( char ** aNodeName ,
95                                             SUPERV::GraphEvent & anEvent ,
96                                             SUPERV::GraphState & aState ,
97                                             bool WithWait ) {
98   return GraphExecutor::OutNode::Event( aNodeName , anEvent , aState , WithWait ) ;
99 }
100 inline bool GraphExecutor::DataFlow::EventW( char ** aNodeName ,
101                                              SUPERV::GraphEvent & anEvent ,
102                                              SUPERV::GraphState & aState ) {
103   return GraphExecutor::OutNode::EventW( aNodeName , anEvent , aState ) ;
104 }
105 inline long GraphExecutor::DataFlow::EventQSize() {
106   return GraphExecutor::OutNode::EventQSize() ;
107 }
108
109 inline SUPERV::GraphState GraphExecutor::DataFlow::State() {
110   return GraphExecutor::OutNode::State() ;
111 }
112
113 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
114                                const char * aNodeName ) {
115   return GraphExecutor::OutNode::State( aNodeName ) ;
116 }
117
118 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
119                                const char * aNodeName ,
120                                const char * anOutServiceParameterName ) {
121   return GraphExecutor::OutNode::State( aNodeName ,
122                                         anOutServiceParameterName ) ;
123 }
124
125 inline long GraphExecutor::DataFlow::Thread() {
126   return GraphExecutor::OutNode::ThreadNo() ;
127 }
128 inline long GraphExecutor::DataFlow::Thread( const char * aNodeName ) {
129   return GraphExecutor::OutNode::Thread( aNodeName ) ;
130 }
131
132 inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState() {
133   return GraphExecutor::OutNode::AutomatonState() ;
134 }
135
136 inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState(
137                                const char * aNodeName ) {
138   return GraphExecutor::OutNode::AutomatonState( aNodeName ) ;
139 }
140
141 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState() {
142   return GraphExecutor::OutNode::ControlState() ;
143 }
144
145 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState(
146                                const char * aNodeName ) {
147   return GraphExecutor::OutNode::ControlState( aNodeName ) ;
148 }
149
150 inline void GraphExecutor::DataFlow::ControlClear() {
151   return GraphExecutor::OutNode::ControlClear() ;
152 }
153
154 inline void GraphExecutor::DataFlow::ControlClear(
155                                const char * aNodeName ) {
156   return GraphExecutor::OutNode::ControlClear( aNodeName ) ;
157 }
158
159 inline bool GraphExecutor::DataFlow::IsWaiting() {
160   return GraphExecutor::OutNode::IsWaiting() ;
161 }
162 inline bool GraphExecutor::DataFlow::IsReady() {
163   return GraphExecutor::OutNode::IsReady() ;
164 }
165 inline bool GraphExecutor::DataFlow::IsRunning() {
166   return GraphExecutor::OutNode::IsRunning() ;
167 }
168 inline bool GraphExecutor::DataFlow::IsDone() {
169   return GraphExecutor::OutNode::IsDone() ;
170 }
171 inline bool GraphExecutor::DataFlow::IsSuspended() {
172   return GraphExecutor::OutNode::IsSuspended() ;
173 }
174
175 inline bool GraphExecutor::DataFlow::IsWaiting(const char * aNodeName ) {
176   return GraphExecutor::OutNode::IsWaiting( aNodeName ) ;
177 }
178 inline bool GraphExecutor::DataFlow::IsReady(const char * aNodeName ) {
179   return GraphExecutor::OutNode::IsReady( aNodeName ) ;
180 }
181 inline bool GraphExecutor::DataFlow::IsRunning(const char * aNodeName ) {
182   return GraphExecutor::OutNode::IsRunning( aNodeName ) ;
183 }
184 inline bool GraphExecutor::DataFlow::IsDone(const char * aNodeName ) {
185   return GraphExecutor::OutNode::IsDone( aNodeName ) ;
186 }
187 inline bool GraphExecutor::DataFlow::IsSuspended(const char * aNodeName ) {
188   return GraphExecutor::OutNode::IsSuspended( aNodeName ) ;
189 }
190
191 inline bool GraphExecutor::DataFlow::IsDone(
192                                   const char * aNodeName ,
193                                   const char * anOutServiceParameterName ) {
194   return GraphExecutor::OutNode::IsDone( aNodeName ,
195                                          anOutServiceParameterName ) ;
196 }
197
198 inline bool GraphExecutor::DataFlow::ReadyWait() {
199   return GraphExecutor::OutNode::ReadyWait() ;
200 }
201 inline bool GraphExecutor::DataFlow::RunningWait() {
202   return GraphExecutor::OutNode::RunningWait() ;
203 }
204 inline bool GraphExecutor::DataFlow::DoneWait() {
205   return GraphExecutor::OutNode::DoneWait() ;
206 }
207 inline bool GraphExecutor::DataFlow::SuspendedWait() {
208   return GraphExecutor::OutNode::SuspendedWait() ;
209 }
210
211 inline bool GraphExecutor::DataFlow::ReadyWait(const char * aNodeName ) {
212   return GraphExecutor::OutNode::ReadyWait( aNodeName ) ;
213 }
214 inline bool GraphExecutor::DataFlow::RunningWait(const char * aNodeName ) {
215   return GraphExecutor::OutNode::RunningWait( aNodeName ) ;
216 }
217 inline bool GraphExecutor::DataFlow::DoneWait(const char * aNodeName ) {
218   return GraphExecutor::OutNode::DoneWait( aNodeName ) ;
219 }
220 inline bool GraphExecutor::DataFlow::SuspendedWait(const char * aNodeName ) {
221   return GraphExecutor::OutNode::SuspendedWait( aNodeName ) ;
222 }
223
224 inline const CORBA::Any *GraphExecutor::DataFlow::GetInData(
225                                    const char * ToNodeName ,
226                                    const char * ToParameterName ) {
227   return GraphExecutor::OutNode::GetInData( ToNodeName ,
228                                             ToParameterName ) ;
229 }
230 inline const CORBA::Any *GraphExecutor::DataFlow::GetOutData(
231                                    const char * FromNodeName ,
232                                    const char * FromParameterName ) {
233   return GraphExecutor::OutNode::GetOutData( FromNodeName ,
234                                              FromParameterName ) ;
235 }
236 #endif
237
238
239