1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 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
22 // SUPERV GraphExecutor : contains classes that permit execution of graphs and particularly the execution automaton
23 // File : DataFlowExecutor_DataFlow.lxx
26 #ifndef _DATAFLOWEXECUTOR_DATAFLOW_LXX
27 #define _DATAFLOWEXECUTOR_DATAFLOW_LXX
29 #include "DataFlowExecutor_OutNode.hxx"
31 inline bool GraphExecutor::DataFlow::LoadDataFlow( const GraphBase::SGraph * aDataFlow ) {
32 return GraphExecutor::OutNode::LoadDataFlow( aDataFlow ) ;
35 //inline bool GraphExecutor::DataFlow::LoadXml( const char* myFileName ) {
36 // return GraphExecutor::OutNode::LoadXml( myFileName ) ;
39 inline const SALOME_ModuleCatalog::Service * GraphExecutor::DataFlow::NodeService( const char * aNodeName ) {
40 if ( Graph()->GetGraphNode( aNodeName ) )
41 return Graph()->GetGraphNode( aNodeName )->GetService() ;
45 inline bool GraphExecutor::DataFlow::AddInputData( const char* ToNodeName ,
46 const char* ToParameterName ,
47 const CORBA::Any aValue ) {
50 return Graph()->AddInputData( ToNodeName , ToParameterName , aValue ) ;
53 inline bool GraphExecutor::DataFlow::ChangeInputData( const char* ToNodeName ,
54 const char* ToParameterName ,
55 const CORBA::Any aValue ) {
58 return Graph()->ChangeInputData( ToNodeName , ToParameterName , aValue ) ;
61 inline bool GraphExecutor::DataFlow::IsValid() {
62 return GraphExecutor::OutNode::IsValid() ;
65 inline bool GraphExecutor::DataFlow::IsExecutable() {
66 return GraphExecutor::OutNode::IsExecutable() ;
69 inline bool GraphExecutor::DataFlow::Run( const bool AndSuspend ) {
70 return GraphExecutor::OutNode::Run( AndSuspend ) ;
73 inline long GraphExecutor::DataFlow::LastLevelDone() {
74 return GraphExecutor::OutNode::LastLevelDone() ;
77 inline long GraphExecutor::DataFlow::Threads() {
78 return GraphExecutor::OutNode::Threads() ;
81 inline bool GraphExecutor::DataFlow::Event( char ** aNodeName ,
82 SUPERV::GraphEvent & anEvent ,
83 SUPERV::GraphState & aState ,
85 return GraphExecutor::OutNode::Event( aNodeName , anEvent , aState , WithWait ) ;
87 inline bool GraphExecutor::DataFlow::EventW( char ** aNodeName ,
88 SUPERV::GraphEvent & anEvent ,
89 SUPERV::GraphState & aState ) {
90 return GraphExecutor::OutNode::EventW( aNodeName , anEvent , aState ) ;
92 inline long GraphExecutor::DataFlow::EventQSize() {
93 return GraphExecutor::OutNode::EventQSize() ;
96 inline void GraphExecutor::DataFlow::State(GraphExecutor::AutomatonState aState ) {
97 GraphExecutor::OutNode::State( aState ) ;
100 inline SUPERV::GraphState GraphExecutor::DataFlow::State() {
101 return GraphExecutor::OutNode::State() ;
104 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
105 const char * aNodeName ) {
106 return GraphExecutor::OutNode::State( aNodeName ) ;
109 inline SUPERV::GraphState GraphExecutor::DataFlow::State(
110 const char * aNodeName ,
111 const char * anOutServiceParameterName ) {
112 return GraphExecutor::OutNode::State( aNodeName ,
113 anOutServiceParameterName ) ;
116 inline long GraphExecutor::DataFlow::Thread() {
117 return GraphExecutor::OutNode::ThreadNo() ;
119 inline long GraphExecutor::DataFlow::Thread( const char * aNodeName ) {
120 return GraphExecutor::OutNode::Thread( aNodeName ) ;
123 inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState() {
124 return GraphExecutor::OutNode::AutomatonState() ;
127 inline GraphExecutor::AutomatonState GraphExecutor::DataFlow::AutomatonState(
128 const char * aNodeName ) {
129 return GraphExecutor::OutNode::AutomatonState( aNodeName ) ;
132 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState() {
133 return GraphExecutor::OutNode::ControlState() ;
136 inline SUPERV::ControlState GraphExecutor::DataFlow::ControlState(
137 const char * aNodeName ) {
138 return GraphExecutor::OutNode::ControlState( aNodeName ) ;
141 inline void GraphExecutor::DataFlow::ControlClear() {
142 return GraphExecutor::OutNode::ControlClear() ;
145 inline void GraphExecutor::DataFlow::ControlClear(
146 const char * aNodeName ) {
147 return GraphExecutor::OutNode::ControlClear( aNodeName ) ;
150 inline bool GraphExecutor::DataFlow::IsWaiting() {
151 return GraphExecutor::OutNode::IsWaiting() ;
153 inline bool GraphExecutor::DataFlow::IsReady() {
154 return GraphExecutor::OutNode::IsReady() ;
156 inline bool GraphExecutor::DataFlow::IsRunning() {
157 return GraphExecutor::OutNode::IsRunning() ;
159 inline bool GraphExecutor::DataFlow::IsDone() {
160 return GraphExecutor::OutNode::IsDone() ;
162 inline bool GraphExecutor::DataFlow::IsSuspended() {
163 return GraphExecutor::OutNode::IsSuspended() ;
166 inline bool GraphExecutor::DataFlow::IsWaiting(const char * aNodeName ) {
167 return GraphExecutor::OutNode::IsWaiting( aNodeName ) ;
169 inline bool GraphExecutor::DataFlow::IsReady(const char * aNodeName ) {
170 return GraphExecutor::OutNode::IsReady( aNodeName ) ;
172 inline bool GraphExecutor::DataFlow::IsRunning(const char * aNodeName ) {
173 return GraphExecutor::OutNode::IsRunning( aNodeName ) ;
175 inline bool GraphExecutor::DataFlow::IsDone(const char * aNodeName ) {
176 return GraphExecutor::OutNode::IsDone( aNodeName ) ;
178 inline bool GraphExecutor::DataFlow::IsSuspended(const char * aNodeName ) {
179 return GraphExecutor::OutNode::IsSuspended( aNodeName ) ;
182 inline bool GraphExecutor::DataFlow::PortDone( const char * aNodeName ,
183 const char * anOutServiceParameterName ) {
184 return GraphExecutor::OutNode::PortDone( aNodeName ,
185 anOutServiceParameterName ) ;
188 inline bool GraphExecutor::DataFlow::ReadyWait() {
189 return GraphExecutor::OutNode::ReadyWait() ;
191 inline bool GraphExecutor::DataFlow::RunningWait() {
192 return GraphExecutor::OutNode::RunningWait() ;
194 inline bool GraphExecutor::DataFlow::DoneWait() {
195 return GraphExecutor::OutNode::DoneWait() ;
197 inline bool GraphExecutor::DataFlow::SuspendedWait() {
198 return GraphExecutor::OutNode::SuspendedWait() ;
201 inline bool GraphExecutor::DataFlow::ReadyWait(const char * aNodeName ) {
202 return GraphExecutor::OutNode::ReadyWait( aNodeName ) ;
204 inline bool GraphExecutor::DataFlow::RunningWait(const char * aNodeName ) {
205 return GraphExecutor::OutNode::RunningWait( aNodeName ) ;
207 inline bool GraphExecutor::DataFlow::DoneWait(const char * aNodeName ) {
208 return GraphExecutor::OutNode::DoneWait( aNodeName ) ;
210 inline bool GraphExecutor::DataFlow::SuspendedWait(const char * aNodeName ) {
211 return GraphExecutor::OutNode::SuspendedWait( aNodeName ) ;
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 ,
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 ) ;