Salome HOME
NRI : Merge from V1_2.
[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 ( GetGraphNode( aNodeName ) )
44     return 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 GraphBase::Graph::ChangeInputData( ToNodeName , ToParameterName ,
54                                             aValue ) ; 
55 } ;
56
57 inline bool GraphExecutor::DataFlow::AddInputSharedData(const char* ToNodeName1 ,
58                                                       const char* ToParameterName1 ,
59                                                       const char* ToNodeName2 ,
60                                                       const char* ToParameterName2 ) {
61   if ( !IsValid() )
62     return false ;
63   return GraphExecutor::OutNode::AddInputData( ToNodeName1 ,
64                                                ToParameterName1 ,
65                                                ToNodeName2 ,
66                                                ToParameterName2 ) ;
67 //                                         aKindOfPortValue ) ; 
68 } ;
69
70 inline bool GraphExecutor::DataFlow::IsValid() {
71   return GraphExecutor::OutNode::IsValid() ;
72 }
73
74 inline bool GraphExecutor::DataFlow::IsExecutable() {
75   return GraphExecutor::OutNode::IsExecutable() ;
76 }
77
78 inline bool GraphExecutor::DataFlow::Run( const bool AndSuspend ) {
79   return GraphExecutor::OutNode::Run( AndSuspend ) ;
80 }
81 inline bool GraphExecutor::DataFlow::Run( const char * aNodeName ,
82                                           const char * AtNodeName ,
83                                           const bool AndSuspend ) {
84   return GraphExecutor::OutNode::Run( aNodeName ,  AtNodeName , AndSuspend ) ;
85 }
86
87 inline long GraphExecutor::DataFlow::LastLevelDone() {
88   return GraphExecutor::OutNode::LastLevelDone() ;
89 }
90
91 inline long GraphExecutor::DataFlow::Threads() {
92   return GraphExecutor::OutNode::Threads() ;
93 }
94
95 inline bool GraphExecutor::DataFlow::Event( char ** aNodeName ,
96                                             SUPERV::GraphEvent & anEvent ,
97                                             SUPERV::GraphState & aState ,
98                                             bool WithWait ) {
99   return GraphExecutor::OutNode::Event( aNodeName , anEvent , aState , WithWait ) ;
100 }
101 inline bool GraphExecutor::DataFlow::EventW( char ** aNodeName ,
102                                              SUPERV::GraphEvent & anEvent ,
103                                              SUPERV::GraphState & aState ) {
104   return GraphExecutor::OutNode::EventW( aNodeName , anEvent , aState ) ;
105 }
106
107 inline SUPERV::GraphState GraphExecutor::DataFlow::State() {
108   return GraphExecutor::OutNode::State() ;
109 }
110
111 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
112                                const char * aNodeName ) {
113   return GraphExecutor::OutNode::State( aNodeName ) ;
114 }
115
116 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
117                                const char * aNodeName ,
118                                const char * anOutServiceParameterName ) {
119   return GraphExecutor::OutNode::State( aNodeName ,
120                                         anOutServiceParameterName ) ;
121 }
122
123 inline long GraphExecutor::DataFlow::Thread() {
124   return GraphExecutor::OutNode::ThreadNo() ;
125 }
126 inline long GraphExecutor::DataFlow::Thread( const char * aNodeName ) {
127   return GraphExecutor::OutNode::Thread( aNodeName ) ;
128 }
129
130 inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState() {
131   return GraphExecutor::OutNode::AutomatonState() ;
132 }
133
134 inline SUPERV::AutomatonState GraphExecutor::DataFlow::AutomatonState(
135                                const char * aNodeName ) {
136   return GraphExecutor::OutNode::AutomatonState( aNodeName ) ;
137 }
138
139 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState() {
140   return GraphExecutor::OutNode::ControlState() ;
141 }
142
143 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState(
144                                const char * aNodeName ) {
145   return GraphExecutor::OutNode::ControlState( aNodeName ) ;
146 }
147
148 inline void GraphExecutor::DataFlow::ControlClear() {
149   return GraphExecutor::OutNode::ControlClear() ;
150 }
151
152 inline void GraphExecutor::DataFlow::ControlClear(
153                                const char * aNodeName ) {
154   return GraphExecutor::OutNode::ControlClear( aNodeName ) ;
155 }
156
157 inline bool GraphExecutor::DataFlow::IsWaiting() {
158   return GraphExecutor::OutNode::IsWaiting() ;
159 }
160 inline bool GraphExecutor::DataFlow::IsReady() {
161   return GraphExecutor::OutNode::IsReady() ;
162 }
163 inline bool GraphExecutor::DataFlow::IsRunning() {
164   return GraphExecutor::OutNode::IsRunning() ;
165 }
166 inline bool GraphExecutor::DataFlow::IsDone() {
167   return GraphExecutor::OutNode::IsDone() ;
168 }
169 inline bool GraphExecutor::DataFlow::IsSuspended() {
170   return GraphExecutor::OutNode::IsSuspended() ;
171 }
172
173 inline bool GraphExecutor::DataFlow::IsWaiting(const char * aNodeName ) {
174   return GraphExecutor::OutNode::IsWaiting( aNodeName ) ;
175 }
176 inline bool GraphExecutor::DataFlow::IsReady(const char * aNodeName ) {
177   return GraphExecutor::OutNode::IsReady( aNodeName ) ;
178 }
179 inline bool GraphExecutor::DataFlow::IsRunning(const char * aNodeName ) {
180   return GraphExecutor::OutNode::IsRunning( aNodeName ) ;
181 }
182 inline bool GraphExecutor::DataFlow::IsDone(const char * aNodeName ) {
183   return GraphExecutor::OutNode::IsDone( aNodeName ) ;
184 }
185 inline bool GraphExecutor::DataFlow::IsSuspended(const char * aNodeName ) {
186   return GraphExecutor::OutNode::IsSuspended( aNodeName ) ;
187 }
188
189 inline bool GraphExecutor::DataFlow::IsDone(
190                                   const char * aNodeName ,
191                                   const char * anOutServiceParameterName ) {
192   return GraphExecutor::OutNode::IsDone( aNodeName ,
193                                          anOutServiceParameterName ) ;
194 }
195
196 inline bool GraphExecutor::DataFlow::ReadyWait() {
197   return GraphExecutor::OutNode::ReadyWait() ;
198 }
199 inline bool GraphExecutor::DataFlow::RunningWait() {
200   return GraphExecutor::OutNode::RunningWait() ;
201 }
202 inline bool GraphExecutor::DataFlow::DoneWait() {
203   return GraphExecutor::OutNode::DoneWait() ;
204 }
205 inline bool GraphExecutor::DataFlow::SuspendedWait() {
206   return GraphExecutor::OutNode::SuspendedWait() ;
207 }
208
209 inline bool GraphExecutor::DataFlow::ReadyWait(const char * aNodeName ) {
210   return GraphExecutor::OutNode::ReadyWait( aNodeName ) ;
211 }
212 inline bool GraphExecutor::DataFlow::RunningWait(const char * aNodeName ) {
213   return GraphExecutor::OutNode::RunningWait( aNodeName ) ;
214 }
215 inline bool GraphExecutor::DataFlow::DoneWait(const char * aNodeName ) {
216   return GraphExecutor::OutNode::DoneWait( aNodeName ) ;
217 }
218 inline bool GraphExecutor::DataFlow::SuspendedWait(const char * aNodeName ) {
219   return GraphExecutor::OutNode::SuspendedWait( aNodeName ) ;
220 }
221
222 inline const CORBA::Any *GraphExecutor::DataFlow::GetInData(
223                                    const char * ToNodeName ,
224                                    const char * ToParameterName ) {
225   return GraphExecutor::OutNode::GetInData( ToNodeName ,
226                                             ToParameterName ) ;
227 }
228 inline const CORBA::Any *GraphExecutor::DataFlow::GetOutData(
229                                    const char * FromNodeName ,
230                                    const char * FromParameterName ) {
231   return GraphExecutor::OutNode::GetOutData( FromNodeName ,
232                                              FromParameterName ) ;
233 }
234 #endif
235
236
237