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