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.salome-platform.org/ or email : webmaster.salome@opencascade.com
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 ) ;
74 inline long GraphExecutor::DataFlow::LastLevelDone() {
75 return GraphExecutor::OutNode::LastLevelDone() ;
78 inline long GraphExecutor::DataFlow::Threads() {
79 return GraphExecutor::OutNode::Threads() ;
82 inline bool GraphExecutor::DataFlow::Event( char ** aNodeName ,
83 SUPERV::GraphEvent & anEvent ,
84 SUPERV::GraphState & aState ,
86 return GraphExecutor::OutNode::Event( aNodeName , anEvent , aState , WithWait ) ;
88 inline bool GraphExecutor::DataFlow::EventW( char ** aNodeName ,
89 SUPERV::GraphEvent & anEvent ,
90 SUPERV::GraphState & aState ) {
91 return GraphExecutor::OutNode::EventW( aNodeName , anEvent , aState ) ;
93 inline long GraphExecutor::DataFlow::EventQSize() {
94 return GraphExecutor::OutNode::EventQSize() ;
97 inline void GraphExecutor::DataFlow::State(GraphExecutor::AutomatonState aState ) {
98 GraphExecutor::OutNode::State( aState ) ;
101 inline SUPERV::GraphState GraphExecutor::DataFlow::State() {
102 return GraphExecutor::OutNode::State() ;
105 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
106 const char * aNodeName ) {
107 return GraphExecutor::OutNode::State( aNodeName ) ;
110 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
111 const char * aNodeName ,
112 const char * anOutServiceParameterName ) {
113 return GraphExecutor::OutNode::State( aNodeName ,
114 anOutServiceParameterName ) ;
117 inline long GraphExecutor::DataFlow::Thread() {
118 return GraphExecutor::OutNode::ThreadNo() ;
120 inline long GraphExecutor::DataFlow::Thread( const char * aNodeName ) {
121 return GraphExecutor::OutNode::Thread( aNodeName ) ;
124 inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState() {
125 return GraphExecutor::OutNode::AutomatonState() ;
128 inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState(
129 const char * aNodeName ) {
130 return GraphExecutor::OutNode::AutomatonState( aNodeName ) ;
133 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState() {
134 return GraphExecutor::OutNode::ControlState() ;
137 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState(
138 const char * aNodeName ) {
139 return GraphExecutor::OutNode::ControlState( aNodeName ) ;
142 inline void GraphExecutor::DataFlow::ControlClear() {
143 return GraphExecutor::OutNode::ControlClear() ;
146 inline void GraphExecutor::DataFlow::ControlClear(
147 const char * aNodeName ) {
148 return GraphExecutor::OutNode::ControlClear( aNodeName ) ;
151 inline bool GraphExecutor::DataFlow::IsWaiting() {
152 return GraphExecutor::OutNode::IsWaiting() ;
154 inline bool GraphExecutor::DataFlow::IsReady() {
155 return GraphExecutor::OutNode::IsReady() ;
157 inline bool GraphExecutor::DataFlow::IsRunning() {
158 return GraphExecutor::OutNode::IsRunning() ;
160 inline bool GraphExecutor::DataFlow::IsDone() {
161 return GraphExecutor::OutNode::IsDone() ;
163 inline bool GraphExecutor::DataFlow::IsSuspended() {
164 return GraphExecutor::OutNode::IsSuspended() ;
167 inline bool GraphExecutor::DataFlow::IsWaiting(const char * aNodeName ) {
168 return GraphExecutor::OutNode::IsWaiting( aNodeName ) ;
170 inline bool GraphExecutor::DataFlow::IsReady(const char * aNodeName ) {
171 return GraphExecutor::OutNode::IsReady( aNodeName ) ;
173 inline bool GraphExecutor::DataFlow::IsRunning(const char * aNodeName ) {
174 return GraphExecutor::OutNode::IsRunning( aNodeName ) ;
176 inline bool GraphExecutor::DataFlow::IsDone(const char * aNodeName ) {
177 return GraphExecutor::OutNode::IsDone( aNodeName ) ;
179 inline bool GraphExecutor::DataFlow::IsSuspended(const char * aNodeName ) {
180 return GraphExecutor::OutNode::IsSuspended( aNodeName ) ;
183 inline bool GraphExecutor::DataFlow::PortDone( const char * aNodeName ,
184 const char * anOutServiceParameterName ) {
185 return GraphExecutor::OutNode::PortDone( aNodeName ,
186 anOutServiceParameterName ) ;
189 inline bool GraphExecutor::DataFlow::ReadyWait() {
190 return GraphExecutor::OutNode::ReadyWait() ;
192 inline bool GraphExecutor::DataFlow::RunningWait() {
193 return GraphExecutor::OutNode::RunningWait() ;
195 inline bool GraphExecutor::DataFlow::DoneWait() {
196 return GraphExecutor::OutNode::DoneWait() ;
198 inline bool GraphExecutor::DataFlow::SuspendedWait() {
199 return GraphExecutor::OutNode::SuspendedWait() ;
202 inline bool GraphExecutor::DataFlow::ReadyWait(const char * aNodeName ) {
203 return GraphExecutor::OutNode::ReadyWait( aNodeName ) ;
205 inline bool GraphExecutor::DataFlow::RunningWait(const char * aNodeName ) {
206 return GraphExecutor::OutNode::RunningWait( aNodeName ) ;
208 inline bool GraphExecutor::DataFlow::DoneWait(const char * aNodeName ) {
209 return GraphExecutor::OutNode::DoneWait( aNodeName ) ;
211 inline bool GraphExecutor::DataFlow::SuspendedWait(const char * aNodeName ) {
212 return GraphExecutor::OutNode::SuspendedWait( aNodeName ) ;
215 //JR 30.03.2005inline const CORBA::Any *GraphExecutor::DataFlow::GetInData(
216 inline const CORBA::Any GraphExecutor::DataFlow::GetInData(
217 const char * ToNodeName ,
218 const char * ToParameterName ) {
219 return GraphExecutor::OutNode::GetInData( ToNodeName ,
222 //JR 30.03.2005inline const CORBA::Any *GraphExecutor::DataFlow::GetOutData(
223 inline const CORBA::Any GraphExecutor::DataFlow::GetOutData(
224 const char * FromNodeName ,
225 const char * FromParameterName ) {
226 return GraphExecutor::OutNode::GetOutData( FromNodeName ,
227 FromParameterName ) ;