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 OutNode( ORB, ptrNamingService , DataFlowName , DebugFileName ) {
46 cdebug_in << "GraphExecutor::DataFlow::DataFlow(" ;
48 cdebug << DataFlowName ;
50 cdebug << ")" << endl;
52 _theNamingService = ptrNamingService ;
54 cdebug_out << "GraphExecutor::DataFlow::DataFlow" << endl;
57 GraphExecutor::DataFlow::DataFlow(
59 SALOME_NamingService* ptrNamingService ,
60 const SALOME_ModuleCatalog::Service& DataFlowService ,
61 const char *DataFlowComponentName ,
62 const char *DataFlowInterfaceName ,
63 const char *DataFlowName ,
64 const SUPERV::KindOfNode DataFlowkind ,
65 const SUPERV::SDate DataFlowFirstCreation ,
66 const SUPERV::SDate DataFlowLastModification ,
67 const char * DataFlowExecutorRelease ,
68 const char * DataFlowAuthor ,
69 const char * DataFlowComputer ,
70 const char * DataFlowComment ,
71 const char * DebugFileName ) :
72 OutNode( ORB, ptrNamingService , DataFlowService , DataFlowComponentName ,
73 DataFlowInterfaceName , DataFlowName , DataFlowkind ,
74 DataFlowFirstCreation , DataFlowLastModification ,
75 DataFlowExecutorRelease , DataFlowAuthor ,
76 DataFlowComputer , DataFlowComment , DebugFileName ) {
77 cdebug_in << "GraphExecutor::DataFlow::DataFlow(" << DataFlowName << ")" << endl;
79 _theNamingService = ptrNamingService ;
81 cdebug_out << "GraphExecutor::DataFlow::DataFlow" << endl;
84 GraphExecutor::DataFlow::~DataFlow() {
85 // delete _DataFlowNode ;
86 // delete _DataFlowDatas ;
90 bool GraphExecutor::DataFlow::Ping( const char *aNodeName ) {
91 cdebug_in << "GraphExecutor::DataFlow::Ping" << aNodeName << " )" << endl;
93 if ( GetGraphNode( aNodeName ) )
94 RetVal = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode())->Ping() ;
95 cdebug_out << "GraphExecutor::DataFlow::Ping" << endl;
99 bool GraphExecutor::DataFlow::ContainerKill() {
100 cdebug_in << "GraphExecutor::DataFlow::ContainerKill()" << endl;
101 bool RetVal = GraphExecutor::OutNode::ContainerKill() ;
102 cdebug_out << "GraphExecutor::DataFlow::ContainerKill()" << endl;
106 bool GraphExecutor::DataFlow::ContainerKill( const char *aNodeName ) {
107 // cdebug_in << "GraphExecutor::DataFlow::ContainerKill( " << aNodeName << " )"<< endl;
108 bool RetVal = false ;
109 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
111 RetVal = aNode->ContainerKill() ;
113 // cdebug_out << "GraphExecutor::DataFlow::ContainerKill" << endl;
117 bool GraphExecutor::DataFlow::Kill() {
118 cdebug_in << "GraphExecutor::DataFlow::Kill()" << endl;
119 bool RetVal = GraphExecutor::OutNode::Kill() ;
120 cdebug_out << "GraphExecutor::DataFlow::Kill()" << endl;
124 bool GraphExecutor::DataFlow::Kill( const char *aNodeName ) {
125 // cdebug_in << "GraphExecutor::DataFlow::Kill( " << aNodeName << " )"<< endl;
126 bool RetVal = false ;
127 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
129 RetVal = aNode->Kill() ;
131 // cdebug_out << "GraphExecutor::DataFlow::Kill" << endl;
135 bool GraphExecutor::DataFlow::KillDone( const char *aNodeName ) {
136 // cdebug_in << "GraphExecutor::DataFlow::KillDone( " << aNodeName << " )"<< endl;
137 bool RetVal = false ;
138 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
140 RetVal = aNode->KillDone() ;
142 // cdebug_out << "GraphExecutor::DataFlow::KillDone" << endl;
146 bool GraphExecutor::DataFlow::Suspend() {
147 cdebug_in << "GraphExecutor::DataFlow::Suspend()" << endl;
148 bool RetVal = GraphExecutor::OutNode::Suspend() ;
149 cdebug_out << "GraphExecutor::DataFlow::Suspend()" << RetVal << endl;
153 bool GraphExecutor::DataFlow::Suspend( const char *aNodeName ) {
154 // cdebug_in << "GraphExecutor::DataFlow::Suspend( " << aNodeName << " )"<< endl;
155 bool RetVal = false ;
156 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
158 RetVal = aNode->Suspend() ;
160 // cdebug_out << "GraphExecutor::DataFlow::Suspend" << endl;
164 bool GraphExecutor::DataFlow::SuspendDone() {
165 cdebug_in << "GraphExecutor::DataFlow::SuspendDone()" << endl;
166 bool RetVal = false ;
167 cdebug << "Kill not yet implemented." << endl;
168 cdebug_out << "GraphExecutor::DataFlow::SuspendDone()" << endl;
172 bool GraphExecutor::DataFlow::SuspendDone( const char *aNodeName ) {
173 // cdebug_in << "GraphExecutor::DataFlow::SuspendDone( " << aNodeName << " )"<< endl;
174 bool RetVal = false ;
175 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
177 RetVal = aNode->SuspendDone() ;
179 // cdebug_out << "GraphExecutor::DataFlow::SuspendDone" << endl;
183 bool GraphExecutor::DataFlow::Resume() {
184 cdebug_in << "GraphExecutor::DataFlow::Resume()" << endl;
185 bool RetVal = GraphExecutor::OutNode::Resume() ;
186 cdebug_out << "GraphExecutor::DataFlow::Resume()" << RetVal << endl;
190 bool GraphExecutor::DataFlow::Resume( const char *aNodeName ) {
191 // cdebug_in << "GraphExecutor::DataFlow::Resume( " << aNodeName << " )"<< endl;
192 bool RetVal = false ;
193 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
195 RetVal = aNode->Resume() ;
197 // cdebug_out << "GraphExecutor::DataFlow::Resume" << endl;
201 bool GraphExecutor::DataFlow::Stop() {
202 cdebug_in << "GraphExecutor::DataFlow::Stop()" << endl;
203 bool RetVal = GraphExecutor::OutNode::Stop() ;
204 cdebug_out << "GraphExecutor::DataFlow::Stop()" << endl;
208 bool GraphExecutor::DataFlow::Stop( const char *aNodeName ) {
209 // cdebug_in << "GraphExecutor::DataFlow::Stop( " << aNodeName << " )"<< endl;
210 bool RetVal = false ;
211 GraphExecutor::InNode * aNode = ((GraphExecutor::InNode *) GetGraphNode( aNodeName )->GetInNode()) ;
213 RetVal = aNode->Stop() ;
215 // cdebug_out << "GraphExecutor::DataFlow::Stop" << endl;