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