Salome HOME
This commit was generated by cvs2git to track changes on a CVS vendor
[modules/superv.git] / src / Supervision / CNode_Impl.cxx
1 using namespace std;
2 //=============================================================================
3 // File      : CNode_Impl.cxx
4 // Created   : 2003
5 // Author    : Jean Rahuel
6 // Project   : SALOME
7 // $Header: 
8 //=============================================================================
9
10 #include <stdio.h>
11 #include <fstream>
12 #include <strstream>
13 #include <string>
14
15 #include "utilities.h"
16
17 #include "Graph_Impl.hxx"
18
19 #include "CNode_Impl.hxx"
20
21 #include "Port_Impl.hxx"
22
23 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
24                         PortableServer::POA_ptr poa ,
25                         PortableServer::ObjectId * contId , 
26                         const char *instanceName ,
27                         const char *interfaceName ,
28                         const char *aDataFlowName ) :
29   Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
30 //  MESSAGE("CNode_Impl::CNode_Impl activate object instanceName("
31 //          << instanceName << ") interfaceName(" << interfaceName << ") --> "
32 //          << hex << (void *) this << dec )
33 //  _thisObj = this ;
34 //  _id = _poa->activate_object(_thisObj);
35   MESSAGE( "CNode_Impl::CNode_Impl " << aDataFlowName << " " );
36   beginService( "CNode_Impl::CNode_Impl" );
37   _Orb = CORBA::ORB::_duplicate(orb);
38   _Poa = poa ;
39   _ContId = contId ;
40   _DataFlowNode = NULL ;
41   _IsNode = false ;
42   endService( "CNode_Impl::CNode_Impl" );  
43 }
44
45 CNode_Impl::CNode_Impl() {
46 }
47
48 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
49                         PortableServer::POA_ptr poa ,
50                         PortableServer::ObjectId * contId , 
51                         const char *instanceName ,
52                         const char *interfaceName ,
53                         GraphEditor::DataFlow * DataFlowEditor ,
54                         const SALOME_ModuleCatalog::Service &NodeService ,
55                         const char * NodeName ,
56                         const SUPERV::KindOfNode NodeKindOfNode ,
57                         const char * FuncName  ,
58                         const SUPERV::ListOfStrings & PythonFunction ) :
59   Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
60   beginService( "CNode_Impl::CNode_Impl" );
61   if ( FuncName && NodeName ) {
62     cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName
63          << " " << strlen(NodeName) << " " << (void *) FuncName << " " << FuncName
64          << " " << strlen( FuncName ) << endl ;
65   }
66   if ( NodeKindOfNode == SUPERV::ComputingNode ) {
67     MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" );
68     _thisObj = this ;
69     _id = _poa->activate_object(_thisObj);
70   }
71   _Orb = CORBA::ORB::_duplicate(orb);
72   _Poa = poa ;
73   _ContId = contId ;
74   _DataFlowEditor = DataFlowEditor ;
75   GraphBase::ListOfFuncName aFuncName ;
76   GraphBase::ListOfPythonFunctions aPythonFunction ;
77   if ( FuncName ) {
78     aFuncName.resize(1) ;
79     aFuncName[0] = my_strdup( FuncName ) ;
80     aPythonFunction.resize(1) ;
81     aPythonFunction[0] = &PythonFunction ;
82   }
83   _DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName ,
84                                             NodeKindOfNode ,
85                                             aFuncName ,
86                                             aPythonFunction ) ;
87   _IsNode = true ;
88   endService( "CNode_Impl::CNode_Impl" );  
89 }
90
91 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
92                         PortableServer::POA_ptr poa ,
93                         PortableServer::ObjectId * contId , 
94                         const char *instanceName ,
95                         const char *interfaceName ,
96                         GraphEditor::DataFlow * DataFlowEditor ,
97                         const SALOME_ModuleCatalog::Service &NodeService ,
98                         const char * NodeName ,
99                         const SUPERV::KindOfNode NodeKindOfNode ,
100                         const GraphBase::ListOfFuncName & aFuncName  ,
101                         const GraphBase::ListOfPythonFunctions & aPythonFunction ) :
102   Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
103   MESSAGE( NodeName << " " );
104   beginService( "CNode_Impl::CNode_Impl" );
105   if ( NodeName ) {
106     MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ;
107   }
108   if ( NodeKindOfNode == SUPERV::ComputingNode ) {
109     MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" );
110     _thisObj = this ;
111     _id = _poa->activate_object(_thisObj);
112   }
113   _Orb = CORBA::ORB::_duplicate(orb);
114   _Poa = poa ;
115   _ContId = contId ;
116   _DataFlowEditor = DataFlowEditor ;
117   _DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName ,
118                                             NodeKindOfNode ,
119                                             aFuncName ,
120                                             aPythonFunction ) ;
121   _IsNode = true ;
122   endService( "CNode_Impl::CNode_Impl" );  
123 }
124
125 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
126                         PortableServer::POA_ptr poa ,
127                         PortableServer::ObjectId * contId , 
128                         const char *instanceName ,
129                         const char *interfaceName ,
130                         GraphEditor::DataFlow * DataFlowEditor ,
131                         GraphEditor::InNode * DataFlowNode ) :
132   Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
133   MESSAGE( DataFlowNode->Name() << " " );
134   beginService( "CNode_Impl::CNode_Impl" );
135   if ( DataFlowNode->IsComputingNode() ) {
136     MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
137     _thisObj = this ;
138     _id = _poa->activate_object(_thisObj);
139   }
140   _Orb = CORBA::ORB::_duplicate(orb);
141   _Poa = poa ;
142   _ContId = contId ;
143   _DataFlowEditor = DataFlowEditor ;
144   _DataFlowNode = DataFlowNode ;
145   _IsNode = true ;
146   endService( "CNode_Impl::CNode_Impl" );  
147 }
148
149 CNode_Impl::~CNode_Impl() {
150   beginService( "CNode_Impl::~CNode_Impl" );
151   endService( "CNode_Impl::~CNode_Impl" );
152 }
153
154 void CNode_Impl::destroy() {
155   beginService( "CNode_Impl::Destroy" );
156   if ( _DataFlowEditor->IsEditing() ) {
157     if ( Delete() ) {
158       _DataFlowNode = NULL ;
159       _poa->deactivate_object(*_id) ;
160       CORBA::release(_poa) ;
161       delete(_id) ;
162       _thisObj->_remove_ref();
163     }
164   }
165   endService( "CNode_Impl::Destroy" );
166 }
167
168 bool CNode_Impl::Delete() {
169   beginService( "CNode_Impl::Delete" );
170   bool RetVal = false ;
171   if ( _DataFlowEditor->IsEditing() ) {
172     RetVal = _DataFlowEditor->RemoveNode( Name() ) ;
173     if ( RetVal )
174       RetVal = _DataFlowEditor->IsValid() ;
175   }
176   endService( "CNode_Impl::Delete" );
177   return RetVal ;
178 }
179
180 SALOME_ModuleCatalog::Service * CNode_Impl::Service() {
181 //  beginService( "CNode_Impl::Service" );
182   SALOME_ModuleCatalog::Service * RetVal ;
183   if ( _IsNode ) {
184     RetVal = new SALOME_ModuleCatalog::Service( *_DataFlowNode->GetService() ) ;
185   }
186   else {
187     RetVal = new SALOME_ModuleCatalog::Service( *_DataFlowEditor->GetService() ) ;
188   }
189 //  endService( "CNode_Impl::Service" );
190   return RetVal ;
191 }
192
193 char * CNode_Impl::Name() {
194 //  beginService( "CNode_Impl::Name" );
195   char * RetVal = NULL ;
196   if ( _IsNode ) {
197     RetVal = _DataFlowNode->Name() ;
198   }
199   else {
200    RetVal = _DataFlowEditor->Name() ;
201   }
202 //  endService( "CNode_Impl::Name" );
203   return CORBA::string_dup( RetVal );
204 }
205 bool CNode_Impl::SetName( const char * aDataFlowName ) {
206 //  beginService( "CNode_Impl::SetName" );
207   bool RetVal = false ;
208   if ( _DataFlowEditor->IsEditing() ) {
209     if ( _IsNode ) {
210       RetVal = _DataFlowEditor->ReNameNode( _DataFlowNode->Name() ,
211                                             aDataFlowName ) ;
212     }
213     else {
214      RetVal = _DataFlowEditor->Name( aDataFlowName ) ;
215     }
216   }
217 //  endService( "CNode_Impl::SetName" );
218   return RetVal ;
219 }
220 SUPERV::KindOfNode CNode_Impl::Kind() {
221 //  beginService( "CNode_Impl::Kind" );
222   SUPERV::KindOfNode RetVal = SUPERV::UnknownNode ;
223   if ( _IsNode ) {
224     RetVal = _DataFlowNode->Kind() ;
225   }
226   else {
227     RetVal = _DataFlowEditor->Kind() ;
228   }
229 //  endService( "CNode_Impl::Kind" );
230   return RetVal ;
231 }
232 bool CNode_Impl::IsGraph() {
233 //  beginService( "CNode_Impl::IsGraph" );
234   bool RetVal = false ;
235   if ( _IsNode ) {
236     RetVal = _DataFlowNode->IsDataFlowNode() ;
237   }
238   else {
239     RetVal = _DataFlowEditor->IsDataFlowNode() ;
240   }
241 //  endService( "CNode_Impl::IsGraph" );
242   return RetVal ;
243 }
244 bool CNode_Impl::IsComputing() {
245 //  beginService( "CNode_Impl::IsComputing" );
246   bool RetVal = SUPERV::UnknownNode ;
247   if ( _IsNode ) {
248     RetVal = _DataFlowNode->IsComputingNode() ;
249   }
250   else {
251     RetVal = _DataFlowEditor->IsComputingNode() ;
252   }
253 //  endService( "CNode_Impl::IsComputing" );
254   return RetVal ;
255 }
256 bool CNode_Impl::IsFactory() {
257 //  beginService( "CNode_Impl::IsFactory" );
258   bool RetVal = SUPERV::UnknownNode ;
259   if ( _IsNode ) {
260     RetVal = _DataFlowNode->IsFactoryNode() ;
261   }
262   else {
263     RetVal = _DataFlowEditor->IsFactoryNode() ;
264   }
265 //  endService( "CNode_Impl::IsFactory" );
266   return RetVal ;
267 }
268 bool CNode_Impl::IsInLine() {
269 //  beginService( "CNode_Impl::IsInLine" );
270   bool RetVal = SUPERV::UnknownNode ;
271   if ( _IsNode ) {
272     RetVal = _DataFlowNode->IsInLineNode() ;
273   }
274   else {
275     RetVal = _DataFlowEditor->IsInLineNode() ;
276   }
277 //  endService( "CNode_Impl::IsInLine" );
278   return RetVal ;
279 }
280 bool CNode_Impl::IsGOTO() {
281 //  beginService( "CNode_Impl::IsGOTO" );
282   bool RetVal = SUPERV::UnknownNode ;
283   if ( _IsNode ) {
284     RetVal = _DataFlowNode->IsGOTONode() ;
285   }
286   else {
287     RetVal = _DataFlowEditor->IsGOTONode() ;
288   }
289 //  endService( "CNode_Impl::IsGOTO" );
290   return RetVal ;
291 }
292 bool CNode_Impl::IsLoop() {
293 //  beginService( "CNode_Impl::IsLoop" );
294   bool RetVal = SUPERV::UnknownNode ;
295   if ( _IsNode ) {
296     RetVal = _DataFlowNode->IsLoopNode() ;
297   }
298   else {
299     RetVal = _DataFlowEditor->IsLoopNode() ;
300   }
301 //  endService( "CNode_Impl::IsLoop" );
302   return RetVal ;
303 }
304 bool CNode_Impl::IsEndLoop() {
305 //  beginService( "CNode_Impl::IsEndLoop" );
306   bool RetVal = SUPERV::UnknownNode ;
307   if ( _IsNode ) {
308     RetVal = _DataFlowNode->IsEndLoopNode() ;
309   }
310   else {
311     RetVal = _DataFlowEditor->IsEndLoopNode() ;
312   }
313 //  endService( "CNode_Impl::IsEndLoop" );
314   return RetVal ;
315 }
316 bool CNode_Impl::IsSwitch() {
317 //  beginService( "CNode_Impl::IsSwitch" );
318   bool RetVal = SUPERV::UnknownNode ;
319   if ( _IsNode ) {
320     RetVal = _DataFlowNode->IsSwitchNode() ;
321   }
322   else {
323     RetVal = _DataFlowEditor->IsSwitchNode() ;
324   }
325 //  endService( "CNode_Impl::IsSwitch" );
326   return RetVal ;
327 }
328 bool CNode_Impl::IsEndSwitch() {
329 //  beginService( "CNode_Impl::IsEndSwitch" );
330   bool RetVal = SUPERV::UnknownNode ;
331   if ( _IsNode ) {
332     RetVal = _DataFlowNode->IsEndSwitchNode() ;
333   }
334   else {
335     RetVal = _DataFlowEditor->IsEndSwitchNode() ;
336   }
337 //  endService( "CNode_Impl::IsEndSwitch" );
338   return RetVal ;
339 }
340
341 SUPERV::SDate CNode_Impl::CreationDate() {
342 //  beginService( "CNode_Impl::CreationDate" );
343   SUPERV::SDate_var RetVal ;
344   if ( _IsNode ) {
345     RetVal = new SUPERV::SDate( _DataFlowNode->FirstCreation() ) ;
346   }
347   else {
348 //    cout << " CNode_Impl::CreationDate " << _DataFlowEditor->FirstCreation()
349 //         << endl ;
350     RetVal = new SUPERV::SDate( _DataFlowEditor->FirstCreation() ) ;
351   }
352 //  endService( "CNode_Impl::CreationDate" );
353   return (RetVal._retn()) ;
354 }
355 SUPERV::SDate CNode_Impl::LastUpdateDate() {
356 //  beginService( "CNode_Impl::LastUpdateDate" );
357   SUPERV::SDate_var RetVal ;
358   if ( _IsNode ) {
359     RetVal = new SUPERV::SDate( _DataFlowNode->LastModification() ) ;
360   }
361   else {
362     RetVal = new SUPERV::SDate( _DataFlowEditor->LastModification() ) ;
363   }
364 //  endService( "CNode_Impl::LastUpdateDate" );
365   return  (RetVal._retn()) ;
366 }
367 char * CNode_Impl::Version() {
368 //  beginService( "CNode_Impl::Version" );
369   char * RetVal ;
370   if ( _IsNode ) {
371     RetVal = _DataFlowNode->EditorRelease() ;
372   }
373   else {
374     RetVal = _DataFlowEditor->EditorRelease() ;
375   }
376 //  endService( "CNode_Impl::Version" );
377   return CORBA::string_dup( RetVal ) ;
378 }
379 char * CNode_Impl::Author() {
380 //  beginService( "CNode_Impl::Author" );
381   char * RetVal ;
382   if ( _IsNode ) {
383     RetVal = _DataFlowNode->Author() ;
384   }
385   else {
386     RetVal = _DataFlowEditor->Author() ;
387   }
388 //  endService( "CNode_Impl::Author" );
389   return CORBA::string_dup( RetVal ) ;
390 }
391 bool CNode_Impl::SetAuthor( const char * aDataFlowAuthor ) {
392 //  beginService( "CNode_Impl::SetAuthor" );
393   bool RetVal = false ;
394   if ( _DataFlowEditor->IsEditing() ) {
395     if ( _IsNode ) {
396       RetVal = _DataFlowNode->Author( aDataFlowAuthor ) ;
397     }
398     else {
399       RetVal = _DataFlowEditor->Author( aDataFlowAuthor ) ;
400     }
401   }
402 //  endService( "CNode_Impl::SetAuthor" );
403   return RetVal ;
404 }
405 char * CNode_Impl::Comment() {
406 //  beginService( "CNode_Impl::Comment" );
407   char * RetVal ;
408   if ( _IsNode ) {
409     RetVal = _DataFlowNode->Comment() ;
410   }
411   else {
412     RetVal = _DataFlowEditor->Comment() ;
413   }
414 //  endService( "CNode_Impl::Comment" );
415   return CORBA::string_dup( RetVal ) ;
416 }
417 bool CNode_Impl::SetComment( const char * aDataFlowComment ) {
418 //  beginService( "CNode_Impl::SetComment" );
419   bool RetVal = false ;
420   if ( _DataFlowEditor->IsEditing() ) {
421     if ( _IsNode ) {
422       RetVal = _DataFlowNode->Comment( aDataFlowComment ) ;
423     }
424     else {
425       RetVal = _DataFlowEditor->Comment( aDataFlowComment ) ;
426     }
427   }
428 //  endService( "CNode_Impl::SetComment" );
429   return RetVal ;
430 }
431
432 SUPERV::ListOfLinks * CNode_Impl::Links() {
433   beginService( "CNode_Impl::Links" ) ;
434   SUPERV::ListOfLinks_var RetVal = new SUPERV::ListOfLinks ;
435   if ( _DataFlowNode ) {
436     RetVal = DataFlowEditor()->ObjImpl()->Links( _DataFlowNode->ComputingNode() , NULL ) ;
437   }
438   endService( "CNode_Impl::Links" ) ;
439   return ( RetVal._retn() ) ;
440 }
441
442 void CNode_Impl::Coords(long X , long Y ) {
443 //  beginService( "CNode_Impl::Coords" );
444   if ( _DataFlowEditor->IsEditing() ) {
445     if ( _IsNode ) {
446       ((GraphEditor::InNode *) _DataFlowNode)->Coordinates( X , Y ) ;
447     }
448     else {
449       _DataFlowEditor->Coordinates( X , Y ) ;
450     }
451   }
452 //  endService( "CNode_Impl::Coords" );
453 }
454 long CNode_Impl::X() {
455 //  beginService( "CNode_Impl::X" );
456   long RetVal ;
457   if ( _IsNode ) {
458     RetVal = _DataFlowNode->XCoordinate() ;
459   }
460   else {
461 //    RetVal = _DataFlowEditor->XCoordinate() ;
462     RetVal = 0 ;
463   }
464 //  endService( "CNode_Impl::X" );
465   return RetVal ;
466 }
467 long CNode_Impl::Y() {
468 //  beginService( "CNode_Impl::Y" );
469   long RetVal ;
470   if ( _IsNode ) {
471     RetVal = _DataFlowNode->YCoordinate() ;
472   }
473   else {
474 //    RetVal = _DataFlowEditor->YCoordinate() ;
475     RetVal = 0 ;
476   }
477 //  endService( "CNode_Impl::Y" );
478   return RetVal ;
479 }
480
481 #if 0
482 SUPERV::Link_ptr CNode_Impl::Link( const char * ToServiceParameterName ,
483                                    const SUPERV::Value_ptr aValue ) {
484   beginService( "CNode_Impl::Link" );
485   Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
486                                       instanceName() , interfaceName() ,
487                                       _DataFlowEditor ,
488                                       _DataFlowNode ,
489                                       ToServiceParameterName ,
490                                       aValue ) ;
491   PortableServer::ObjectId * id = myLink->getId() ;
492   CORBA::Object_var obj = _poa->id_to_reference(*id);
493   SUPERV::Link_var iobject ;
494   iobject = SUPERV::Link::_narrow(obj) ;
495   endService( "CNode_Impl::Link" );
496   return SUPERV::Link::_duplicate( iobject ) ;
497 }
498 #endif
499
500 SUPERV::Port_ptr CNode_Impl::Port( const char * ServiceParameterName ) {
501   bool begin = true ;
502   Port_Impl * myPort = NULL ;
503   SUPERV::Port_var iobject = SUPERV::Port::_nil() ;
504   bool aninport ;
505   if ( _IsNode ) {
506     aninport = _DataFlowNode->GetInPort( ServiceParameterName ) ;
507   }
508   else {
509     aninport = _DataFlowEditor->GetInPort( ServiceParameterName ) ;
510   }  
511   bool anoutport ;
512   if ( _IsNode ) {
513     anoutport = _DataFlowNode->GetOutPort( ServiceParameterName ) ;
514   }
515   else {
516     anoutport = _DataFlowEditor->GetOutPort( ServiceParameterName ) ;
517   }  
518   if ( aninport ) {
519     GraphBase::InPort * anInPort ;
520     if ( _IsNode ) {
521       anInPort = _DataFlowNode->GetChangeInPort( ServiceParameterName ) ;
522     }
523     else {
524       anInPort = _DataFlowEditor->GetChangeInPort( ServiceParameterName ) ;
525     }
526     if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
527       if ( begin ) {
528         beginService( "CNode_Impl::Port" );
529         begin = false ;
530       }
531       bool hasinput ;
532       if ( _IsNode ) {
533         hasinput = _DataFlowNode->HasInput( anInPort->PortName() ) ;
534       }
535       else {
536         hasinput = _DataFlowEditor->HasInput( anInPort->PortName() ) ;
537       }
538       if ( hasinput ) {
539         const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
540         myPort = new Port_Impl( _Orb , _Poa , _ContId ,
541                                 instanceName() , interfaceName() ,
542                                 _DataFlowEditor ,
543                                 _DataFlowNode ,
544 //                                ServiceParameterName ,
545                                 (GraphBase::Port * ) anInPort ,
546                                 true ,
547                                 anAny ) ;
548       }
549       else {
550         myPort = new Port_Impl( _Orb , _Poa , _ContId ,
551                                 instanceName() , interfaceName() ,
552                                 _DataFlowEditor ,
553                                 _DataFlowNode ,
554 //                                ServiceParameterName ) ;
555                                 (GraphBase::Port * ) anInPort ,
556                                 true ) ;
557       }
558       PortableServer::ObjectId * id = myPort->getId() ;
559       CORBA::Object_var obj = _poa->id_to_reference(*id);
560       iobject = SUPERV::Port::_narrow(obj) ;
561       anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
562     }
563     else {
564       iobject = anInPort->ObjRef() ;
565     }
566   }
567   else if ( anoutport ) {
568     GraphBase::OutPort * anOutPort ;
569     if ( _IsNode ) {
570       anOutPort = _DataFlowNode->GetChangeOutPort( ServiceParameterName ) ;
571     }
572     else {
573       anOutPort = _DataFlowEditor->GetChangeOutPort( ServiceParameterName ) ;
574     }
575     if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
576       if ( begin ) {
577         beginService( "CNode_Impl::Port" );
578         begin = false ;
579       }
580       const CORBA::Any * anAny = anOutPort->Value() ;
581       myPort = new Port_Impl( _Orb , _Poa , _ContId ,
582                               instanceName() , interfaceName() ,
583                               _DataFlowEditor ,
584                               _DataFlowNode ,
585 //                              ServiceParameterName ,
586                               (GraphBase::Port * ) anOutPort ,
587                               false ,
588                               anAny ) ;
589       PortableServer::ObjectId * id = myPort->getId() ;
590       CORBA::Object_var obj = _poa->id_to_reference(*id);
591       iobject = SUPERV::Port::_narrow(obj) ;
592       anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
593     }
594     else {
595       iobject = anOutPort->ObjRef() ;
596     }
597   }
598   if ( !begin ) {
599     endService( "CNode_Impl::Port" );
600   }
601   return SUPERV::Port::_duplicate( iobject ) ;
602 }
603
604 SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName ,
605                                     const SUPERV::Value_ptr aValue ) {
606   bool begin = true ;
607   SUPERV::Port_var iobject = SUPERV::Port::_nil() ;
608   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
609   if ( _DataFlowEditor->IsEditing() ) {
610     bool sts = false ;
611     GraphBase::InPort * anInPort ;
612     if ( _IsNode ) {
613       sts = _DataFlowEditor->AddInputData( _DataFlowNode->Name() ,
614                                            ToServiceParameterName ,
615                                            *aValue->ToAny() ) ;
616       anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
617     }
618     else {
619       sts = _DataFlowEditor->AddInputData( _DataFlowEditor->Name() ,
620                                            ToServiceParameterName ,
621                                            *aValue->ToAny() ) ;
622       anInPort = _DataFlowEditor->GetChangeInPort( ToServiceParameterName ) ;
623     }
624     if ( sts && anInPort ) {
625       if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
626         if ( begin ) {
627           beginService( "CNode_Impl::Input" );
628           begin = false ;
629         }
630         Port_Impl * myPort ;
631         myPort = new Port_Impl( _Orb , _Poa , _ContId ,
632                                 instanceName() , interfaceName() ,
633                                 _DataFlowEditor ,
634                                 _DataFlowNode ,
635 //                                ToServiceParameterName ,
636                                 (GraphBase::Port * ) anInPort ,
637                                 true ,
638                                 aValue->ToAny() ) ;
639         PortableServer::ObjectId * id = myPort->getId() ;
640         CORBA::Object_var obj = _poa->id_to_reference(*id);
641         iobject = SUPERV::Port::_narrow(obj) ;
642         anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
643       }
644       else {
645         iobject = anInPort->ObjRef() ;
646       }
647     }
648   }
649   else if ( _DataFlowExecutor ) {
650     bool sts = false ;
651     GraphBase::InPort * anInPort ;
652     if ( _IsNode ) {
653       sts = _DataFlowExecutor->ChangeInputData( _DataFlowEditor->Name() ,
654                                                 ToServiceParameterName ,
655                                                 *aValue->ToAny() ) ;
656       anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
657     }
658     else {
659       sts = _DataFlowExecutor->ChangeInputData( _DataFlowEditor->Name() ,
660                                                 ToServiceParameterName ,
661                                                 *aValue->ToAny() ) ;
662       anInPort = _DataFlowEditor->GetChangeInPort( ToServiceParameterName ) ;
663     }
664     if ( sts && anInPort ) {
665       if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
666         if ( begin ) {
667           beginService( "CNode_Impl::Input" );
668           begin = false ;
669         }
670         Port_Impl * myPort ;
671         myPort = new Port_Impl( _Orb , _Poa , _ContId ,
672                                 instanceName() , interfaceName() ,
673                                 _DataFlowEditor ,
674                                 _DataFlowNode ,
675 //                                ToServiceParameterName ,
676                                 (GraphBase::Port * ) anInPort ,
677                                 true ,
678                                 aValue->ToAny() ) ;
679         PortableServer::ObjectId * id = myPort->getId() ;
680         CORBA::Object_var obj = _poa->id_to_reference(*id);
681         iobject = SUPERV::Port::_narrow(obj) ;
682         anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
683       }
684       else {
685         iobject = anInPort->ObjRef() ;
686       }
687     }
688   }
689   if ( !begin ) {
690     endService( "CNode_Impl::Input" );
691   }
692   return SUPERV::Port::_duplicate( iobject ) ;
693 }
694
695 SUPERV::ListOfPorts * CNode_Impl::Ports() {
696   bool begin = true ;
697   SUPERV::ListOfPorts_var RetVal = new SUPERV::ListOfPorts ;
698 //  if ( !_DataFlowNode->IsDataFlowNode() ) {
699   if ( _IsNode ) {
700     int i , j ;
701     RetVal->length( _DataFlowNode->GetNodeInPortsSize() +
702                     _DataFlowNode->GetNodeOutPortsSize() ) ;
703     for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) {
704       GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ;
705       if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
706         if ( begin ) {
707           beginService( "CNode_Impl::Ports" );
708           begin = false ;
709         }
710         Port_Impl * myPort ;
711         if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) {
712           const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
713           myPort = new Port_Impl( _Orb , _Poa , _ContId ,
714                                   instanceName() , interfaceName() ,
715                                   _DataFlowEditor ,
716                                   _DataFlowNode ,
717 //                                  anInPort->PortName() ,
718                                   (GraphBase::Port * ) anInPort ,
719                                   true ,
720                                   anAny ) ;
721         }
722         else {
723           myPort = new Port_Impl( _Orb , _Poa , _ContId ,
724                                   instanceName() , interfaceName() ,
725                                   _DataFlowEditor ,
726                                   _DataFlowNode ,
727 //                                  anInPort->PortName() ) ;
728                                   (GraphBase::Port * ) anInPort ,
729                                   true ) ;
730         }
731         PortableServer::ObjectId * id = myPort->getId() ;
732         CORBA::Object_var obj = _poa->id_to_reference(*id);
733         SUPERV::Port_var iobject ;
734         iobject = SUPERV::Port::_narrow(obj) ;
735         RetVal[ i ] = SUPERV::Port::_duplicate( iobject ) ;
736         anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
737       }
738       else {
739         RetVal[ i ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ;
740       }
741     }
742     for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) {
743       GraphBase::OutPort * anOutPort = _DataFlowNode->GetChangeNodeOutPort( i ) ;
744       if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
745         if ( begin ) {
746           beginService( "CNode_Impl::Ports" );
747           begin = false ;
748         }
749         const CORBA::Any * anAny = anOutPort->Value() ;
750         Port_Impl * myPort = new Port_Impl( _Orb , _Poa , _ContId ,
751                                             instanceName() , interfaceName() ,
752                                             _DataFlowEditor ,
753                                             _DataFlowNode ,
754 //                                            anOutPort->PortName() ,
755                                             (GraphBase::Port * ) anOutPort ,
756                                             false ,
757                                             anAny ) ;
758         PortableServer::ObjectId * id = myPort->getId() ;
759         CORBA::Object_var obj = _poa->id_to_reference(*id);
760         SUPERV::Port_var iobject ;
761         iobject = SUPERV::Port::_narrow(obj) ;
762         RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( iobject ) ;
763         anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
764       }
765       else {
766         RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ;
767       }
768     }
769   }
770   else {
771     if ( _DataFlowEditor->IsValid() ) {
772       int i , j ;
773       RetVal->length( _DataFlowEditor->GetNodeInDataNodePortsSize() +
774                       _DataFlowEditor->GetNodeOutDataNodePortsSize() ) ;
775       for ( i = 0 ; i < _DataFlowEditor->GetNodeInDataNodePortsSize() ; i++ ) {
776         GraphBase::OutPort * anOutPort = _DataFlowEditor->GetChangeNodeInDataNodePort(i) ;
777         if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
778           if ( begin ) {
779             beginService( "CNode_Impl::Ports" );
780             begin = false ;
781           }
782           Port_Impl * myPort ;
783           if ( anOutPort->IsDataConnected() ) {
784             const CORBA::Any * anAny = anOutPort->Value() ;
785             myPort = new Port_Impl( _Orb , _Poa , _ContId ,
786                                     instanceName() , interfaceName() ,
787                                     _DataFlowEditor ,
788                                     _DataFlowNode ,
789 //                                    anOutPort->PortName() ,
790                                     (GraphBase::Port * ) anOutPort ,
791                                     true ,
792                                     anAny ) ;
793           }
794           else {
795             myPort = new Port_Impl( _Orb , _Poa , _ContId ,
796                                     instanceName() , interfaceName() ,
797                                     _DataFlowEditor ,
798                                     _DataFlowNode ,
799 //                                    anOutPort->PortName() ) ;
800                                     (GraphBase::Port * ) anOutPort ,
801                                     true ) ;
802           }
803           PortableServer::ObjectId * id = myPort->getId() ;
804           CORBA::Object_var obj = _poa->id_to_reference(*id);
805           SUPERV::Port_var iobject ;
806           iobject = SUPERV::Port::_narrow(obj) ;
807           RetVal[ i ] = SUPERV::Port::_duplicate( iobject ) ;
808           anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
809         }
810         else {
811           RetVal[ i ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ;
812         }
813       }
814       j = _DataFlowEditor->GetNodeInDataNodePortsSize() ;
815       for ( i = 0 ; i < _DataFlowEditor->GetNodeOutDataNodePortsSize() ; i++ ) {
816         GraphBase::InPort * anInPort = _DataFlowEditor->GetChangeNodeOutDataNodePort(i) ;
817         if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
818           if ( begin ) {
819             beginService( "CNode_Impl::Ports" );
820             begin = false ;
821           }
822           Port_Impl * myPort ;
823           if ( anInPort->IsDataConnected() ) {
824             const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
825             myPort = new Port_Impl( _Orb , _Poa , _ContId ,
826                                     instanceName() , interfaceName() ,
827                                     _DataFlowEditor ,
828                                     _DataFlowNode ,
829 //                                    anInPort->PortName() ,
830                                     (GraphBase::Port * ) anInPort ,
831                                     false ,
832                                     anAny ) ;
833           }
834           else {
835             myPort = new Port_Impl( _Orb , _Poa , _ContId ,
836                                     instanceName() , interfaceName() ,
837                                     _DataFlowEditor ,
838                                     _DataFlowNode ,
839 //                                    anInPort->PortName() ) ;
840                                     anInPort ,
841                                     false ) ;
842           }
843           PortableServer::ObjectId * id = myPort->getId() ;
844           CORBA::Object_var obj = _poa->id_to_reference(*id);
845           SUPERV::Port_var iobject ;
846           iobject = SUPERV::Port::_narrow(obj) ;
847           RetVal[ j + i ] = SUPERV::Port::_duplicate( iobject ) ;
848           anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
849         }
850         else {
851           RetVal[ j + i ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ;
852         }
853       }
854     }
855   }
856   if ( !begin ) {
857     endService( "CNode_Impl::Ports" );
858   }
859   return ( RetVal._retn() ) ;
860 }
861
862 SUPERV::Link_ptr CNode_Impl::GetLink(const char * ToServiceParameterName ) {
863   bool begin = true ;
864   SUPERV::Link_var iobject = SUPERV::Link::_nil() ;
865   char* FromNodeName ;
866   char* FromServiceParameterName ;
867   bool status = _DataFlowEditor->GetLink( _DataFlowNode->Name() ,
868                                           ToServiceParameterName ,
869                                           & FromNodeName ,
870                                           & FromServiceParameterName ) ;
871   if ( status ) {
872     GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
873     if ( anInPort->GetOutPort() ) {
874       GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ;
875       if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
876         if ( begin ) {
877           beginService( "CNode_Impl::GetLink" );
878           begin = false ;
879         }
880         Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
881                                             instanceName() , interfaceName() ,
882                                             _DataFlowEditor ,
883                                             _DataFlowNode ,
884                                             ToServiceParameterName ,
885                                             (GraphEditor::InNode *) _DataFlowEditor->GetChangeGraphNode( FromNodeName )->GetInNode() ,
886                                             FromServiceParameterName ,
887                                             true ) ;
888         PortableServer::ObjectId * id = myLink->getId() ;
889         CORBA::Object_var obj = _poa->id_to_reference(*id);
890         iobject = SUPERV::Link::_narrow(obj) ;
891         anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ;
892       }
893       else {
894         iobject = anOutPort->InPortObjRef( anInPort ) ;
895       }
896     }
897   }
898   if ( !begin ) {
899     endService( "CNode_Impl::GetLink" );
900   }
901   return SUPERV::Link::_duplicate( iobject ) ;
902 }
903
904 long CNode_Impl::SubGraph() {
905 //  beginService( "CNode_Impl::SubGraph" );
906   long RetVal = 0 ;
907   if ( _IsNode ) {
908     RetVal = _DataFlowNode->SubGraph() ;
909   }
910 //  endService( "CNode_Impl::SubGraph" );
911   return RetVal ;
912 }
913
914 bool CNode_Impl::IsLinked(const char * ServiceParameterName ) {
915 //  beginService( "CNode_Impl::IsLinked" );
916   bool RetVal = _DataFlowNode->IsLinked( ServiceParameterName ) ;
917 //  endService( "CNode_Impl::IsLinked" );
918   return RetVal ;
919 }
920
921 bool CNode_Impl::HasInput(const char * ServiceParameterName ) {
922 //  beginService( "CNode_Impl::HasInput" );
923   bool RetVal = _DataFlowNode->HasInput( ServiceParameterName ) ;
924 //  endService( "CNode_Impl::HasInput" );
925   return RetVal ;
926 }
927
928 SUPERV::GraphState CNode_Impl::State() {
929 //  beginService( "CNode_Impl::State" );
930   SUPERV::GraphState RetVal = SUPERV::EditingState ;
931   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
932   if ( _DataFlowExecutor ) {
933     if ( _IsNode ) {
934       RetVal = _DataFlowExecutor->State( Name() ) ;
935     }
936     else {
937       RetVal = _DataFlowExecutor->State() ;
938     }
939   }
940 //  endService( "CNode_Impl::State" );
941   return RetVal ;
942 }
943 long CNode_Impl::Thread() {
944 //  beginService( "CNode_Impl::Thread" );
945   long RetVal = 0 ;
946   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
947   if ( _DataFlowExecutor ) {
948     if ( _IsNode ) {
949       RetVal = _DataFlowExecutor->Thread( Name() ) ;
950     }
951     else {
952       RetVal = _DataFlowExecutor->Thread() ;
953     }
954   }
955 //  endService( "CNode_Impl::Thread" );
956   return RetVal ;
957 }
958 SUPERV::AutomatonState CNode_Impl::AutoState() {
959 //  beginService( "CNode_Impl::AutoState" );
960   SUPERV::AutomatonState RetVal = SUPERV::UnKnownState ;
961   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
962   if ( _DataFlowExecutor ) {
963     if ( _IsNode ) {
964       RetVal = _DataFlowExecutor->AutomatonState( Name() ) ;
965     }
966     else {
967       RetVal = _DataFlowExecutor->AutomatonState() ;
968     }
969   }
970 //  endService( "CNode_Impl::AutoState" );
971   return RetVal ;
972 }
973 SUPERV::ControlState CNode_Impl::Control() {
974 //  beginService( "CNode_Impl::Control" );
975   SUPERV::ControlState RetVal = SUPERV::VoidState ;
976   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
977   if ( _DataFlowExecutor ) {
978     if ( _IsNode ) {
979       RetVal = _DataFlowExecutor->ControlState( Name() ) ;
980     }
981     else {
982       RetVal = _DataFlowExecutor->ControlState() ;
983     }
984   }
985 //  endService( "CNode_Impl::Control" );
986   return RetVal ;
987 }
988 void CNode_Impl::ControlClear() {
989 //  beginService( "CNode_Impl::ControlClear" );
990   SUPERV::ControlState RetVal = SUPERV::VoidState ;
991   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
992   if ( _DataFlowExecutor ) {
993     if ( _IsNode ) {
994       _DataFlowExecutor->ControlClear( Name() ) ;
995     }
996     else {
997       _DataFlowExecutor->ControlClear() ;
998     }
999   }
1000 //  endService( "CNode_Impl::ControlClear" );
1001   return ;
1002 }
1003
1004 bool CNode_Impl::IsReady() {
1005 //  beginService( "CNode_Impl::IsReady" );
1006   bool RetVal = false ;
1007   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1008   if ( _DataFlowExecutor ) {
1009     if ( _IsNode ) {
1010       RetVal = _DataFlowExecutor->IsReady( Name() ) ;
1011     }
1012     else {
1013       RetVal = _DataFlowExecutor->IsReady() ;
1014     }
1015   }
1016 //  endService( "CNode_Impl::IsReady" );
1017   return RetVal ;
1018 }
1019
1020 bool CNode_Impl::IsWaiting() {
1021 //  beginService( "CNode_Impl::IsWaiting" );
1022   bool RetVal = false ;
1023   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1024   if ( _DataFlowExecutor ) {
1025     if ( _IsNode ) {
1026       RetVal = _DataFlowExecutor->IsWaiting( Name() ) ;
1027     }
1028     else {
1029       RetVal = _DataFlowExecutor->IsWaiting() ;
1030     }
1031   }
1032 //  endService( "CNode_Impl::IsWaiting" );
1033   return RetVal ;
1034 }
1035
1036 bool CNode_Impl::IsRunning() {
1037 //  beginService( "CNode_Impl::IsRunning" );
1038   bool RetVal = false ;
1039   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1040   if ( _DataFlowExecutor ) {
1041     if ( _IsNode ) {
1042       RetVal = _DataFlowExecutor->IsRunning( Name() ) ;
1043     }
1044     else {
1045       RetVal = _DataFlowExecutor->IsRunning() ;
1046     }
1047   }
1048 //  endService( "CNode_Impl::IsRunning" );
1049   return RetVal ;
1050 }
1051
1052 bool CNode_Impl::IsDone() {
1053 //  beginService( "CNode_Impl::IsDone" );
1054   bool RetVal = false ;
1055   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1056   if ( _DataFlowExecutor ) {
1057     if ( _IsNode ) {
1058       RetVal = _DataFlowExecutor->IsDone( Name() ) ;
1059     }
1060     else {
1061       RetVal = _DataFlowExecutor->IsDone() ;
1062     }
1063   }
1064 //  endService( "CNode_Impl::IsDone" );
1065   return RetVal ;
1066 }
1067
1068 bool CNode_Impl::IsSuspended() {
1069 //  beginService( "CNode_Impl::IsSuspended" );
1070   bool RetVal = false ;
1071   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1072   if ( _DataFlowExecutor ) {
1073     if ( _IsNode ) {
1074       RetVal = _DataFlowExecutor->IsSuspended( Name() ) ;
1075     }
1076     else {
1077       RetVal = _DataFlowExecutor->IsSuspended() ;
1078     }
1079   }
1080 //  endService( "CNode_Impl::IsSuspended" );
1081   return RetVal ;
1082 }
1083
1084 bool CNode_Impl::ReadyW() {
1085 //  beginService( "CNode_Impl::ReadyW" );
1086   bool RetVal = false ;
1087   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1088   if ( _DataFlowExecutor ) {
1089     if ( _IsNode ) {
1090       RetVal = _DataFlowExecutor->ReadyWait( Name() ) ;
1091     }
1092     else {
1093       RetVal = _DataFlowExecutor->ReadyWait() ;
1094     }
1095   }
1096 //  endService( "CNode_Impl::ReadyW" );
1097   return RetVal ;
1098 }
1099
1100 bool CNode_Impl::RunningW() {
1101 //  beginService( "CNode_Impl::RunningW" );
1102   bool RetVal = false ;
1103   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1104   if ( _DataFlowExecutor ) {
1105     if ( _IsNode ) {
1106       RetVal = _DataFlowExecutor->RunningWait( Name() ) ;
1107     }
1108     else {
1109       RetVal = _DataFlowExecutor->RunningWait() ;
1110     }
1111   }
1112 //  endService( "CNode_Impl::RunningW" );
1113   return RetVal ;
1114 }
1115
1116 bool CNode_Impl::DoneW() {
1117 //  beginService( "CNode_Impl::DoneW" );
1118   bool RetVal = false ;
1119   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1120   if ( _DataFlowExecutor ) {
1121     if ( _IsNode ) {
1122       RetVal = _DataFlowExecutor->DoneWait( Name() ) ;
1123     }
1124     else {
1125       RetVal = _DataFlowExecutor->DoneWait() ;
1126     }
1127   }
1128 //  endService( "CNode_Impl::DoneW" );
1129   return RetVal ;
1130 }
1131
1132 bool CNode_Impl::SuspendedW() {
1133 //  beginService( "CNode_Impl::SuspendedW" );
1134   bool RetVal = false ;
1135   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1136   if ( _DataFlowExecutor ) {
1137     if ( _IsNode ) {
1138       RetVal = _DataFlowExecutor->SuspendedWait( Name() ) ;
1139     }
1140     else {
1141       RetVal = _DataFlowExecutor->SuspendedWait() ;
1142     }
1143   }
1144 //  endService( "CNode_Impl::SuspendedW" );
1145   return RetVal ;
1146 }
1147
1148 void CNode_Impl::ping() {
1149 //  beginService( "CNode_Impl::ping" );
1150   bool RetVal = false ;
1151   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1152   if ( _DataFlowExecutor ) {
1153     if ( _IsNode ) {
1154       RetVal = _DataFlowExecutor->Ping( Name() ) ;
1155     }
1156     else {
1157       RetVal = false ;
1158     }
1159   }
1160 //  endService( "CNode_Impl::ping" );
1161   return ;
1162 }
1163
1164 bool CNode_Impl::ContainerKill() {
1165   beginService( "CNode_Impl::ContainerKill" );
1166   bool RetVal = false ;
1167   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1168   if ( _DataFlowExecutor && _DataFlowEditor->IsExecuting() ) {
1169     if ( _IsNode ) {
1170       RetVal = _DataFlowExecutor->ContainerKill( Name() ) ;
1171     }
1172     else {
1173       RetVal = _DataFlowExecutor->ContainerKill() ;
1174     }
1175   }
1176   endService( "CNode_Impl::ContainerKill" );
1177   return RetVal ;
1178 }
1179 bool CNode_Impl::Kill() {
1180 //  beginService( "CNode_Impl::Kill" );
1181   bool RetVal = false ;
1182   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1183   if ( _DataFlowExecutor ) {
1184     if ( _IsNode ) {
1185       RetVal = _DataFlowExecutor->Kill( Name() ) ;
1186     }
1187     else {
1188       RetVal = _DataFlowExecutor->Kill() ;
1189     }
1190   }
1191 //  endService( "CNode_Impl::Kill" );
1192   return RetVal ;
1193 }
1194 bool CNode_Impl::KillDone() {
1195 //  beginService( "CNode_Impl::KillDone" );
1196   bool RetVal = false ;
1197   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1198   if ( _DataFlowExecutor ) {
1199     if ( _IsNode ) {
1200       RetVal = _DataFlowExecutor->KillDone( Name() ) ;
1201     }
1202   }
1203 //  endService( "CNode_Impl::KillDone" );
1204   return RetVal ;
1205 }
1206 bool CNode_Impl::Stop() {
1207 //  beginService( "CNode_Impl::Stop" );
1208   bool RetVal ; // = _DataFlowExecutor->Stop() ;
1209 //  endService( "CNode_Impl::Stop" );
1210   return RetVal ;
1211 }
1212 bool CNode_Impl::Suspend() {
1213 //  beginService( "CNode_Impl::Suspend" );
1214   bool RetVal = false ;
1215   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1216   if ( _DataFlowExecutor ) {
1217     if ( _IsNode ) {
1218       RetVal = _DataFlowExecutor->Suspend( Name() ) ;
1219     }
1220     else {
1221       RetVal = _DataFlowExecutor->Suspend() ;
1222     }
1223   }
1224 //  endService( "CNode_Impl::Suspend" );
1225   return RetVal ;
1226 }
1227 bool CNode_Impl::SuspendDone() {
1228 //  beginService( "CNode_Impl::SuspendDone" );
1229   bool RetVal = false ;
1230   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1231   if ( _DataFlowExecutor ) {
1232     if ( _IsNode ) {
1233       RetVal = _DataFlowExecutor->SuspendDone( Name() ) ;
1234     }
1235     else {
1236       RetVal = _DataFlowExecutor->SuspendDone() ;
1237     }
1238   }
1239 //  endService( "CNode_Impl::SuspendDone" );
1240   return RetVal ;
1241 }
1242 bool CNode_Impl::Resume() {
1243 //  beginService( "CNode_Impl::Resume" );
1244   bool RetVal = false ;
1245   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1246   if ( _DataFlowExecutor ) {
1247     if ( _IsNode ) {
1248       RetVal = _DataFlowExecutor->Resume( Name() ) ;
1249     }
1250     else {
1251       RetVal = _DataFlowExecutor->Resume() ;
1252     }
1253   }
1254 //  endService( "CNode_Impl::Resume" );
1255   return RetVal ;
1256 }
1257
1258 bool CNode_Impl::ReRun() {
1259   beginService( "CNode_Impl::ReRun" );
1260   bool RetVal = false ;
1261   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1262   if ( _DataFlowExecutor ) {
1263     if ( _IsNode ) {
1264       RetVal = _DataFlowExecutor->Run( Name() , Name() , false ) ;
1265     }
1266     else {
1267       RetVal = _DataFlowExecutor->Run( false ) ;
1268     }
1269   }
1270   endService( "CNode_Impl::ReRun" );
1271   return RetVal ;
1272 }
1273
1274 bool CNode_Impl::ReRunAt( const char * aNodeName ) {
1275   beginService( "CNode_Impl::ReRunAt" );
1276   bool RetVal = false ;
1277   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1278   if ( _DataFlowExecutor ) {
1279     if ( _IsNode ) {
1280       RetVal = _DataFlowExecutor->Run( Name() , aNodeName , false ) ;
1281     }
1282   }
1283   endService( "CNode_Impl::ReRunAt" );
1284   return RetVal ;
1285 }
1286
1287 bool CNode_Impl::ReStart() {
1288   beginService( "CNode_Impl::ReStart" );
1289   bool RetVal = false ;
1290   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1291   if ( _DataFlowExecutor ) {
1292     if ( _IsNode ) {
1293       RetVal = _DataFlowExecutor->Run( Name() , Name() , true ) ;
1294     }
1295     else {
1296       RetVal = _DataFlowExecutor->Run( true ) ;
1297     }
1298   }
1299   endService( "CNode_Impl::ReStart" );
1300   return RetVal ;
1301 }
1302
1303 bool CNode_Impl::ReStartAt( const char * aNodeName ) {
1304   beginService( "CNode_Impl::ReStartAt" );
1305   bool RetVal = false ;
1306   GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1307   if ( _DataFlowExecutor ) {
1308     if ( _IsNode ) {
1309       RetVal = _DataFlowExecutor->Run( Name() , aNodeName , true ) ;
1310     }
1311   }
1312   endService( "CNode_Impl::ReStartAt" );
1313   return RetVal ;
1314 }
1315