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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : DataFlowExecutor_DataFlow.cxx
28 #include "DataFlowExecutor_DataFlow.hxx"
30 // Implementation de la classe GraphExecutor::Graph
32 GraphExecutor::DataFlow::DataFlow() :
34 cdebug_in << "GraphExecutor::DataFlow::DataFlowExecutor()" << endl;
36 _theNamingService = NULL ;
38 cdebug_out << "GraphExecutor::DataFlow::DataFlowExecutor()" << endl;
41 GraphExecutor::DataFlow::DataFlow( CORBA::ORB_ptr ORB,
42 SALOME_NamingService* ptrNamingService ,
43 const char *DataFlowName ,
44 const char * DebugFileName ,
45 const SUPERV::KindOfNode aKindOfNode ) :
46 OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName , aKindOfNode ) {
47 cdebug_in << "GraphExecutor::DataFlow::DataFlow(" ;
49 cdebug << DataFlowName ;
51 cdebug << ")" << endl;
53 _theNamingService = ptrNamingService ;
55 cdebug_out << "GraphExecutor::DataFlow::DataFlow" << endl;
58 GraphExecutor::DataFlow::DataFlow(
60 SALOME_NamingService* ptrNamingService ,
61 const SALOME_ModuleCatalog::Service& DataFlowService ,
62 const char *DataFlowComponentName ,
63 const char *DataFlowInterfaceName ,
64 const char *DataFlowName ,
65 const SUPERV::KindOfNode DataFlowkind ,
66 const SUPERV::SDate DataFlowFirstCreation ,
67 const SUPERV::SDate DataFlowLastModification ,
68 const char * DataFlowExecutorRelease ,
69 const char * DataFlowAuthor ,
70 const char * DataFlowComputer ,
71 const char * DataFlowComment ,
72 const char * DebugFileName ) :
73 OutNode( ORB, ptrNamingService , DataFlowService , DataFlowComponentName ,
74 DataFlowInterfaceName , DataFlowName , DataFlowkind ,
75 DataFlowFirstCreation , DataFlowLastModification ,
76 DataFlowExecutorRelease , DataFlowAuthor ,
77 DataFlowComputer , DataFlowComment , DebugFileName ) {
78 cdebug_in << "GraphExecutor::DataFlow::DataFlow(" << DataFlowName << ")" << endl;
80 _theNamingService = ptrNamingService ;
82 cdebug_out << "GraphExecutor::DataFlow::DataFlow" << endl;
85 GraphExecutor::DataFlow::~DataFlow() {
86 // delete _DataFlowNode ;
87 // delete _DataFlowDatas ;
91 bool GraphExecutor::DataFlow::Ping( const char *aNodeName ) {
92 cdebug_in << "GraphExecutor::DataFlow::Ping" << aNodeName << " )" << endl;
94 if ( Graph()->GetGraphNode( aNodeName ) )
95 RetVal = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode())->Ping() ;
96 cdebug_out << "GraphExecutor::DataFlow::Ping" << endl;
100 bool GraphExecutor::DataFlow::ContainerKill() {
101 cdebug_in << "GraphExecutor::DataFlow::ContainerKill()" << endl;
102 bool RetVal = GraphExecutor::OutNode::ContainerKill() ;
103 cdebug_out << "GraphExecutor::DataFlow::ContainerKill()" << endl;
107 bool GraphExecutor::DataFlow::ContainerKill( const char *aNodeName ) {
108 // cdebug_in << "GraphExecutor::DataFlow::ContainerKill( " << aNodeName << " )"<< endl;
109 bool RetVal = false ;
110 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
112 RetVal = aNode->ContainerKill() ;
114 // cdebug_out << "GraphExecutor::DataFlow::ContainerKill" << endl;
118 bool GraphExecutor::DataFlow::Kill() {
119 cdebug_in << "GraphExecutor::DataFlow::Kill()" << endl;
120 bool RetVal = GraphExecutor::OutNode::Kill() ;
121 cdebug_out << "GraphExecutor::DataFlow::Kill()" << endl;
125 bool GraphExecutor::DataFlow::Kill( const char *aNodeName ) {
126 // cdebug_in << "GraphExecutor::DataFlow::Kill( " << aNodeName << " )"<< endl;
127 bool RetVal = false ;
128 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
130 RetVal = aNode->Kill() ;
132 // cdebug_out << "GraphExecutor::DataFlow::Kill" << endl;
136 bool GraphExecutor::DataFlow::KillDone( const char *aNodeName ) {
137 // cdebug_in << "GraphExecutor::DataFlow::KillDone( " << aNodeName << " )"<< endl;
138 bool RetVal = false ;
139 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
141 RetVal = aNode->KillDone() ;
143 // cdebug_out << "GraphExecutor::DataFlow::KillDone" << endl;
147 bool GraphExecutor::DataFlow::Suspend() {
148 cdebug_in << "GraphExecutor::DataFlow::Suspend()" << endl;
149 bool RetVal = GraphExecutor::OutNode::Suspend() ;
150 cdebug_out << "GraphExecutor::DataFlow::Suspend()" << RetVal << endl;
154 bool GraphExecutor::DataFlow::Suspend( const char *aNodeName ) {
155 // cdebug_in << "GraphExecutor::DataFlow::Suspend( " << aNodeName << " )"<< endl;
156 bool RetVal = false ;
157 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
159 RetVal = aNode->Suspend() ;
161 // cdebug_out << "GraphExecutor::DataFlow::Suspend" << endl;
165 bool GraphExecutor::DataFlow::SuspendDone() {
166 cdebug_in << "GraphExecutor::DataFlow::SuspendDone()" << endl;
167 bool RetVal = false ;
168 cdebug << "Kill not yet implemented." << endl;
169 cdebug_out << "GraphExecutor::DataFlow::SuspendDone()" << endl;
173 bool GraphExecutor::DataFlow::SuspendDone( const char *aNodeName ) {
174 // cdebug_in << "GraphExecutor::DataFlow::SuspendDone( " << aNodeName << " )"<< endl;
175 bool RetVal = false ;
176 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
178 RetVal = aNode->SuspendDone() ;
180 // cdebug_out << "GraphExecutor::DataFlow::SuspendDone" << endl;
184 bool GraphExecutor::DataFlow::Resume() {
185 cdebug_in << "GraphExecutor::DataFlow::Resume()" << endl;
186 bool RetVal = GraphExecutor::OutNode::Resume() ;
187 cdebug_out << "GraphExecutor::DataFlow::Resume()" << RetVal << endl;
191 bool GraphExecutor::DataFlow::Resume( const char *aNodeName ) {
192 // cdebug_in << "GraphExecutor::DataFlow::Resume( " << aNodeName << " )"<< endl;
193 bool RetVal = false ;
194 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
196 RetVal = aNode->Resume() ;
198 // cdebug_out << "GraphExecutor::DataFlow::Resume" << endl;
202 bool GraphExecutor::DataFlow::Stop() {
203 cdebug_in << "GraphExecutor::DataFlow::Stop()" << endl;
204 bool RetVal = GraphExecutor::OutNode::Stop() ;
205 cdebug_out << "GraphExecutor::DataFlow::Stop()" << endl;
209 bool GraphExecutor::DataFlow::Stop( const char *aNodeName ) {
210 // cdebug_in << "GraphExecutor::DataFlow::Stop( " << aNodeName << " )"<< endl;
211 bool RetVal = false ;
212 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) Graph()->GetGraphNode( aNodeName )->GetInNode()) ;
214 RetVal = aNode->Stop() ;
216 // cdebug_out << "GraphExecutor::DataFlow::Stop" << endl;