1 // SUPERV Supervision : contains the implementation of interfaces of SuperVision described in SUPERV.idl
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : CNode_Impl.cxx
8 // Author : Jean Rahuel
18 //#include "utilities.h"
20 #include "StreamGraph_Impl.hxx"
22 #include "CNode_Impl.hxx"
24 #include "StreamPort_Impl.hxx"
26 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
27 PortableServer::POA_ptr poa ,
28 PortableServer::ObjectId * contId ,
29 const char *instanceName ,
30 const char *interfaceName ,
31 const char *aDataFlowName ,
32 const SUPERV::KindOfNode aKindOfNode ) :
33 Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
34 // MESSAGE("CNode_Impl::CNode_Impl activate object instanceName("
35 // << instanceName << ") interfaceName(" << interfaceName << ") --> "
36 // << hex << (void *) this << dec )
38 // _id = _poa->activate_object(_thisObj);
39 // MESSAGE( "CNode_Impl::CNode_Impl " << aDataFlowName << " " );
40 // beginService( "CNode_Impl::CNode_Impl" );
41 _Orb = CORBA::ORB::_duplicate(orb);
44 _DataFlowEditor = NULL ;
45 _DataFlowExecutor = NULL ;
46 _DataFlowNode = NULL ;
47 _DataFlowExecutorNode = NULL ;
48 if ( aKindOfNode == SUPERV::MacroNode ) {
54 // endService( "CNode_Impl::CNode_Impl" );
57 CNode_Impl::CNode_Impl() {
60 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
61 PortableServer::POA_ptr poa ,
62 PortableServer::ObjectId * contId ,
63 const char *instanceName ,
64 const char *interfaceName ,
65 GraphEditor::DataFlow * aDataFlowEditor ,
66 const SALOME_ModuleCatalog::Service &NodeService ,
67 const char * NodeName ,
68 const SUPERV::KindOfNode NodeKindOfNode ,
69 const char * FuncName ,
70 const SUPERV::ListOfStrings & PythonFunction ) :
71 Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
72 // beginService( "CNode_Impl::CNode_Impl" );
73 // cout << "CNode_Impl::CNode_Impl -->" << endl ;
74 // if ( FuncName && NodeName ) {
75 // cout << "CNode_Impl::CNode_Impl " << (void *) NodeName << " " << NodeName
76 // << " " << strlen(NodeName) << " " << (void *) FuncName << " " << FuncName
77 // << " " << strlen( FuncName ) << endl ;
79 if ( NodeKindOfNode == SUPERV::ComputingNode ) {
80 // MESSAGE( "CNode_Impl::CNode_Impl " << FuncName << " _poa->activate_object" );
82 _id = _poa->activate_object(_thisObj);
84 _Orb = CORBA::ORB::_duplicate(orb);
87 _DataFlowEditor = aDataFlowEditor ;
88 _DataFlowExecutor = NULL ;
89 DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
90 GraphBase::ListOfFuncName aFuncName ;
91 GraphBase::ListOfPythonFunctions aPythonFunction ;
94 aFuncName[0] = my_strdup( FuncName ) ;
95 aPythonFunction.resize(1) ;
96 aPythonFunction[0] = &PythonFunction ;
98 _DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName ,
102 _DataFlowExecutorNode = NULL ;
104 // endService( "CNode_Impl::CNode_Impl" );
105 // cout << "<-- CNode_Impl::CNode_Impl" << endl ;
108 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
109 PortableServer::POA_ptr poa ,
110 PortableServer::ObjectId * contId ,
111 const char *instanceName ,
112 const char *interfaceName ,
113 GraphEditor::DataFlow * aDataFlowEditor ,
114 const SALOME_ModuleCatalog::Service &NodeService ,
115 const char * NodeName ,
116 const SUPERV::KindOfNode NodeKindOfNode ,
117 const GraphBase::ListOfFuncName & aFuncName ,
118 const GraphBase::ListOfPythonFunctions & aPythonFunction ) :
119 Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
120 // MESSAGE( NodeName << " " );
121 // beginService( "CNode_Impl::CNode_Impl" );
123 // MESSAGE("CNode_Impl::CNode_Impl " << NodeName << " " << strlen( NodeName ) ) ;
125 if ( NodeKindOfNode == SUPERV::ComputingNode ) {
126 // MESSAGE( "CNode_Impl::CNode_Impl " << aFuncName[0] << " _poa->activate_object" );
128 _id = _poa->activate_object(_thisObj);
130 _Orb = CORBA::ORB::_duplicate(orb);
133 _DataFlowEditor = aDataFlowEditor ;
134 _DataFlowExecutor = NULL ;
135 DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
136 _DataFlowNode = _DataFlowEditor->AddNode( NodeService , "" , "" , NodeName ,
140 _DataFlowExecutorNode = NULL ;
142 // endService( "CNode_Impl::CNode_Impl" );
145 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
146 PortableServer::POA_ptr poa ,
147 PortableServer::ObjectId * contId ,
148 const char *instanceName ,
149 const char *interfaceName ,
150 GraphEditor::DataFlow * aDataFlowEditor ,
151 GraphEditor::InNode * aDataFlowNode ) :
152 Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
153 // beginService( "CNode_Impl::CNode_Impl" );
154 if ( aDataFlowNode && aDataFlowNode->IsComputingNode() ) {
155 // MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
157 _id = _poa->activate_object(_thisObj);
160 // MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " );
162 _Orb = CORBA::ORB::_duplicate(orb);
165 _DataFlowEditor = aDataFlowEditor ;
166 _DataFlowExecutor = NULL ;
167 DataFlowEditor()->Graph()->SetGraphEditor( aDataFlowEditor ) ;
168 _DataFlowNode = aDataFlowNode ;
169 _DataFlowExecutorNode = NULL ;
170 if ( aDataFlowNode ) {
176 // endService( "CNode_Impl::CNode_Impl" );
179 CNode_Impl::CNode_Impl( CORBA::ORB_ptr orb ,
180 PortableServer::POA_ptr poa ,
181 PortableServer::ObjectId * contId ,
182 const char *instanceName ,
183 const char *interfaceName ,
184 GraphExecutor::DataFlow * aDataFlowExecutor ,
185 GraphExecutor::InNode * aDataFlowExecutorNode ) :
186 Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, false) {
187 // beginService( "CNode_Impl::CNode_Impl" );
188 if ( aDataFlowExecutorNode && aDataFlowExecutorNode->IsComputingNode() ) {
189 // MESSAGE( "CNode_Impl::CNode_Impl _poa->activate_object" );
191 _id = _poa->activate_object(_thisObj);
194 // MESSAGE( "CNode_Impl::CNode_Impl NO _poa->activate_object " );
196 _Orb = CORBA::ORB::_duplicate(orb);
199 _DataFlowEditor = NULL ;
200 _DataFlowExecutor = aDataFlowExecutor ;
201 DataFlowExecutor()->Graph()->SetGraphExecutor( aDataFlowExecutor ) ;
202 _DataFlowNode = NULL ;
203 _DataFlowExecutorNode = aDataFlowExecutorNode ;
204 if ( aDataFlowExecutorNode ) {
210 // endService( "CNode_Impl::CNode_Impl" );
213 CNode_Impl::~CNode_Impl() {
214 beginService( "CNode_Impl::~CNode_Impl" );
215 endService( "CNode_Impl::~CNode_Impl" );
218 void CNode_Impl::destroy() {
219 beginService( "CNode_Impl::Destroy" );
220 if ( _DataFlowEditor->IsEditing() ) {
222 _DataFlowNode = NULL ;
223 _poa->deactivate_object(*_id) ;
224 CORBA::release(_poa) ;
226 _thisObj->_remove_ref();
229 // endService( "CNode_Impl::Destroy" );
232 bool CNode_Impl::Delete() {
233 beginService( "CNode_Impl::Delete" );
234 bool RetVal = false ;
235 if ( _DataFlowEditor->IsEditing() ) {
237 RetVal = _DataFlowEditor->RemoveNode( Name() ) ;
239 RetVal = _DataFlowEditor->UnValid() ;
242 endService( "CNode_Impl::Delete" );
246 void CNode_Impl::DeletePorts() {
247 beginService( "CNode_Impl::DeletePorts" );
248 if ( _DataFlowEditor->IsEditing() && _DataFlowNode ) {
250 for ( i = 0 ; i < _DataFlowNode->ComputingNode()->GetNodeInPortsSize() ; i++ ) {
251 SUPERV::Port_var aPort = _DataFlowNode->ComputingNode()->GetChangeNodeInPort( i )->ObjRef() ;
252 if ( !CORBA::is_nil( aPort ) ) {
256 for ( i = 0 ; i < _DataFlowNode->ComputingNode()->GetNodeOutPortsSize() ; i++ ) {
257 SUPERV::Port_var aPort = _DataFlowNode->ComputingNode()->GetChangeNodeOutPort( i )->ObjRef() ;
258 if ( !CORBA::is_nil( aPort ) ) {
263 endService( "CNode_Impl::DeletePorts" );
266 SALOME_ModuleCatalog::Service * CNode_Impl::Service() {
267 // beginService( "CNode_Impl::Service" );
268 SALOME_ModuleCatalog::Service * RetVal ;
270 RetVal = new SALOME_ModuleCatalog::Service( *_DataFlowNode->GetService() ) ;
273 RetVal = new SALOME_ModuleCatalog::Service( *_DataFlowEditor->GetService() ) ;
275 // endService( "CNode_Impl::Service" );
279 char * CNode_Impl::Name() {
280 // beginService( "CNode_Impl::Name" );
281 char * RetVal = NULL ;
283 RetVal = _DataFlowNode->Name() ;
286 RetVal = _DataFlowEditor->Graph()->Name() ;
288 // endService( "CNode_Impl::Name" );
289 return CORBA::string_dup( RetVal );
291 bool CNode_Impl::SetName( const char * aDataFlowName ) {
292 // beginService( "CNode_Impl::SetName" );
293 bool RetVal = false ;
294 if ( _DataFlowEditor->IsEditing() ) {
296 RetVal = _DataFlowEditor->ReNameNode( _DataFlowNode->Name() ,
300 // RetVal = _DataFlowEditor->Graph()->Name( aDataFlowName ) ;
301 RetVal = _DataFlowEditor->Name( aDataFlowName ) ;
304 // endService( "CNode_Impl::SetName" );
307 SUPERV::KindOfNode CNode_Impl::Kind() {
308 // beginService( "CNode_Impl::Kind" );
309 SUPERV::KindOfNode RetVal = SUPERV::UnknownNode ;
311 RetVal = _DataFlowNode->Kind() ;
314 RetVal = _DataFlowEditor->Graph()->Kind() ;
316 // endService( "CNode_Impl::Kind" );
319 bool CNode_Impl::IsGraph() {
320 // beginService( "CNode_Impl::IsGraph" );
321 bool RetVal = false ;
323 RetVal = _DataFlowNode->IsDataFlowNode() ;
326 RetVal = _DataFlowEditor->Graph()->IsDataFlowNode() ;
328 // endService( "CNode_Impl::IsGraph" );
331 bool CNode_Impl::IsStreamGraph() {
332 // beginService( "CNode_Impl::IsStreamGraph" );
333 bool RetVal = false ;
335 RetVal = _DataFlowNode->IsDataStreamNode() ;
338 RetVal = _DataFlowEditor->Graph()->IsDataStreamNode() ;
340 // endService( "CNode_Impl::IsStreamGraph" );
343 bool CNode_Impl::IsMacro() {
344 // beginService( "CNode_Impl::IsMacro" );
345 bool RetVal = false ;
346 if ( _IsNode && _DataFlowNode->IsMacroNode() ) {
349 // endService( "CNode_Impl::IsMacro" );
352 bool CNode_Impl::IsFlowMacro() {
353 // beginService( "CNode_Impl::IsFlowMacro" );
354 bool RetVal = false ;
355 if ( _IsNode && _DataFlowNode->IsMacroNode() && _DataFlowNode->ComputingNode()->MacroObject()->IsGraph() ) {
358 // endService( "CNode_Impl::IsFlowMacro" );
361 bool CNode_Impl::IsStreamMacro() {
362 // beginService( "CNode_Impl::IsStreamMacro" );
363 bool RetVal = false ;
364 if ( _IsNode && _DataFlowNode->IsMacroNode() && _DataFlowNode->ComputingNode()->MacroObject()->IsStreamGraph() ) {
367 // endService( "CNode_Impl::IsStreamMacro" );
370 bool CNode_Impl::IsHeadGraph() {
371 bool RetVal = false ;
372 beginService( "CNode_Impl::IsHeadGraph" );
373 endService( "CNode_Impl::IsHeadGraph" );
376 long CNode_Impl::GraphLevel() {
378 beginService( "CNode_Impl::GraphLevel" );
379 RetVal = DataFlowEditor()->Graph()->GraphMacroLevel() ;
380 endService( "CNode_Impl::GraphLevel" );
384 bool CNode_Impl::IsComputing() {
385 // beginService( "CNode_Impl::IsComputing" );
386 bool RetVal = SUPERV::UnknownNode ;
388 RetVal = _DataFlowNode->IsComputingNode() ;
391 RetVal = _DataFlowEditor->Graph()->IsComputingNode() ;
393 // endService( "CNode_Impl::IsComputing" );
396 bool CNode_Impl::IsFactory() {
397 // beginService( "CNode_Impl::IsFactory" );
398 bool RetVal = SUPERV::UnknownNode ;
400 RetVal = _DataFlowNode->IsFactoryNode() ;
403 RetVal = _DataFlowEditor->Graph()->IsFactoryNode() ;
405 // endService( "CNode_Impl::IsFactory" );
408 bool CNode_Impl::IsInLine() {
409 // beginService( "CNode_Impl::IsInLine" );
410 bool RetVal = SUPERV::UnknownNode ;
412 RetVal = _DataFlowNode->IsInLineNode() ;
415 RetVal = _DataFlowEditor->Graph()->IsInLineNode() ;
417 // endService( "CNode_Impl::IsInLine" );
420 bool CNode_Impl::IsGOTO() {
421 // beginService( "CNode_Impl::IsGOTO" );
422 bool RetVal = SUPERV::UnknownNode ;
424 RetVal = _DataFlowNode->IsGOTONode() ;
427 RetVal = _DataFlowEditor->Graph()->IsGOTONode() ;
429 // endService( "CNode_Impl::IsGOTO" );
432 bool CNode_Impl::IsLoop() {
433 // beginService( "CNode_Impl::IsLoop" );
434 bool RetVal = SUPERV::UnknownNode ;
436 RetVal = _DataFlowNode->IsLoopNode() ;
439 RetVal = _DataFlowEditor->Graph()->IsLoopNode() ;
441 // endService( "CNode_Impl::IsLoop" );
444 bool CNode_Impl::IsEndLoop() {
445 // beginService( "CNode_Impl::IsEndLoop" );
446 bool RetVal = SUPERV::UnknownNode ;
448 RetVal = _DataFlowNode->IsEndLoopNode() ;
451 RetVal = _DataFlowEditor->Graph()->IsEndLoopNode() ;
453 // endService( "CNode_Impl::IsEndLoop" );
456 bool CNode_Impl::IsSwitch() {
457 // beginService( "CNode_Impl::IsSwitch" );
458 bool RetVal = SUPERV::UnknownNode ;
460 RetVal = _DataFlowNode->IsSwitchNode() ;
463 RetVal = _DataFlowEditor->Graph()->IsSwitchNode() ;
465 // endService( "CNode_Impl::IsSwitch" );
468 bool CNode_Impl::IsEndSwitch() {
469 // beginService( "CNode_Impl::IsEndSwitch" );
470 bool RetVal = SUPERV::UnknownNode ;
472 RetVal = _DataFlowNode->IsEndSwitchNode() ;
475 RetVal = _DataFlowEditor->Graph()->IsEndSwitchNode() ;
477 // endService( "CNode_Impl::IsEndSwitch" );
481 SUPERV::SDate CNode_Impl::CreationDate() {
482 // beginService( "CNode_Impl::CreationDate" );
483 SUPERV::SDate_var RetVal ;
485 RetVal = new SUPERV::SDate( _DataFlowNode->FirstCreation() ) ;
488 // cout << " CNode_Impl::CreationDate " << _DataFlowEditor->FirstCreation()
490 RetVal = new SUPERV::SDate( _DataFlowEditor->Graph()->FirstCreation() ) ;
492 // endService( "CNode_Impl::CreationDate" );
493 return (RetVal._retn()) ;
495 SUPERV::SDate CNode_Impl::LastUpdateDate() {
496 // beginService( "CNode_Impl::LastUpdateDate" );
497 SUPERV::SDate_var RetVal ;
499 RetVal = new SUPERV::SDate( _DataFlowNode->LastModification() ) ;
502 RetVal = new SUPERV::SDate( _DataFlowEditor->Graph()->LastModification() ) ;
504 // endService( "CNode_Impl::LastUpdateDate" );
505 return (RetVal._retn()) ;
507 char * CNode_Impl::Version() {
508 // beginService( "CNode_Impl::Version" );
511 RetVal = _DataFlowNode->EditorRelease() ;
514 RetVal = _DataFlowEditor->Graph()->EditorRelease() ;
516 // endService( "CNode_Impl::Version" );
517 return CORBA::string_dup( RetVal ) ;
519 char * CNode_Impl::Author() {
520 // beginService( "CNode_Impl::Author" );
523 RetVal = _DataFlowNode->Author() ;
526 RetVal = _DataFlowEditor->Graph()->Author() ;
528 // endService( "CNode_Impl::Author" );
529 return CORBA::string_dup( RetVal ) ;
531 bool CNode_Impl::SetAuthor( const char * aDataFlowAuthor ) {
532 // beginService( "CNode_Impl::SetAuthor" );
533 bool RetVal = false ;
534 if ( _DataFlowEditor->IsEditing() ) {
536 RetVal = _DataFlowNode->Author( aDataFlowAuthor ) ;
539 RetVal = _DataFlowEditor->Graph()->Author( aDataFlowAuthor ) ;
542 // endService( "CNode_Impl::SetAuthor" );
545 char * CNode_Impl::Comment() {
546 // beginService( "CNode_Impl::Comment" );
549 RetVal = _DataFlowNode->Comment() ;
552 RetVal = _DataFlowEditor->Graph()->Comment() ;
554 // endService( "CNode_Impl::Comment" );
555 return CORBA::string_dup( RetVal ) ;
557 bool CNode_Impl::SetComment( const char * aDataFlowComment ) {
558 // beginService( "CNode_Impl::SetComment" );
559 bool RetVal = false ;
560 if ( _DataFlowEditor->IsEditing() ) {
562 RetVal = _DataFlowNode->Comment( aDataFlowComment ) ;
565 RetVal = _DataFlowEditor->Graph()->Comment( aDataFlowComment ) ;
568 // endService( "CNode_Impl::SetComment" );
572 void CNode_Impl::Coords(long X , long Y ) {
573 // beginService( "CNode_Impl::Coords" );
574 if ( _DataFlowEditor->IsEditing() ) {
576 ((GraphEditor::InNode *) _DataFlowNode)->Coordinates( X , Y ) ;
579 _DataFlowEditor->Graph()->Coordinates( X , Y ) ;
582 // endService( "CNode_Impl::Coords" );
584 long CNode_Impl::X() {
585 // beginService( "CNode_Impl::X" );
588 RetVal = _DataFlowNode->XCoordinate() ;
591 RetVal = _DataFlowEditor->Graph()->XCoordinate() ;
593 // endService( "CNode_Impl::X" );
596 long CNode_Impl::Y() {
597 // beginService( "CNode_Impl::Y" );
600 RetVal = _DataFlowNode->YCoordinate() ;
603 RetVal = _DataFlowEditor->Graph()->YCoordinate() ;
605 // endService( "CNode_Impl::Y" );
609 SUPERV::Port_ptr CNode_Impl::Port( const char * ServiceParameterName ) {
611 Port_Impl * myPort = NULL ;
612 SUPERV::Port_var iobject = SUPERV::Port::_nil() ;
615 aninport = _DataFlowNode->GetInPort( ServiceParameterName ) ;
618 aninport = _DataFlowEditor->GetInPort( ServiceParameterName ) ;
622 anoutport = _DataFlowNode->GetOutPort( ServiceParameterName ) ;
625 anoutport = _DataFlowEditor->GetOutPort( ServiceParameterName ) ;
628 GraphBase::InPort * anInPort ;
630 anInPort = _DataFlowNode->GetChangeInPort( ServiceParameterName ) ;
633 anInPort = _DataFlowEditor->GetChangeInPort( ServiceParameterName ) ;
635 if ( anInPort->IsDataStream() ) {
636 MESSAGE( "CNode_Impl::Port ERROR IsDataStream " ) ;
638 else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
640 beginService( "CNode_Impl::Port" );
645 hasinput = _DataFlowNode->HasInput( anInPort->PortName() ) ;
648 hasinput = _DataFlowEditor->HasInput( anInPort->PortName() ) ;
651 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
652 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
653 instanceName() , interfaceName() ,
656 // ServiceParameterName ,
657 (GraphBase::Port * ) anInPort ,
662 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
663 instanceName() , interfaceName() ,
666 // ServiceParameterName ) ;
667 (GraphBase::Port * ) anInPort ,
670 PortableServer::ObjectId * id = myPort->getId() ;
671 CORBA::Object_var obj = _poa->id_to_reference(*id);
672 iobject = SUPERV::Port::_narrow(obj) ;
673 anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
676 iobject = anInPort->ObjRef() ;
679 else if ( anoutport ) {
680 GraphBase::OutPort * anOutPort ;
682 anOutPort = _DataFlowNode->GetChangeOutPort( ServiceParameterName ) ;
685 anOutPort = _DataFlowEditor->GetChangeOutPort( ServiceParameterName ) ;
687 if ( anOutPort->IsDataStream() ) {
688 MESSAGE( "CNode_Impl::Port ERROR IsDataStream " ) ;
690 else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
692 beginService( "CNode_Impl::Port" );
695 const CORBA::Any * anAny = anOutPort->Value() ;
696 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
697 instanceName() , interfaceName() ,
700 // ServiceParameterName ,
701 (GraphBase::Port * ) anOutPort ,
704 PortableServer::ObjectId * id = myPort->getId() ;
705 CORBA::Object_var obj = _poa->id_to_reference(*id);
706 iobject = SUPERV::Port::_narrow(obj) ;
707 anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
710 iobject = anOutPort->ObjRef() ;
714 endService( "CNode_Impl::Port" );
716 DataFlowEditor()->UnValid() ;
717 return SUPERV::Port::_duplicate( iobject ) ;
720 SUPERV::Port_ptr CNode_Impl::Input( const char * ToServiceParameterName ,
721 const SUPERV::Value_ptr aValue ) {
723 SUPERV::Port_var iobject = SUPERV::Port::_nil() ;
724 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
726 GraphBase::InPort * anInPort = NULL ;
727 if ( _DataFlowEditor->IsEditing() && _DataFlowEditor->Graph()->GraphMacroLevel() == 0 ) {
729 sts = _DataFlowEditor->AddInputData( _DataFlowNode->Name() ,
730 ToServiceParameterName ,
732 anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
735 sts = _DataFlowEditor->AddInputData( _DataFlowEditor->Graph()->Name() ,
736 ToServiceParameterName ,
738 anInPort = _DataFlowEditor->Graph()->GetChangeInPort( ToServiceParameterName ) ;
740 if ( sts && anInPort ) {
741 if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
743 beginService( "CNode_Impl::Input" );
747 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
748 instanceName() , interfaceName() ,
751 // ToServiceParameterName ,
752 (GraphBase::Port * ) anInPort ,
755 PortableServer::ObjectId * id = myPort->getId() ;
756 CORBA::Object_var obj = _poa->id_to_reference(*id);
757 iobject = SUPERV::Port::_narrow(obj) ;
758 anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
761 iobject = anInPort->ObjRef() ;
765 else if ( _DataFlowExecutor ) {
767 sts = _DataFlowExecutor->ChangeInputData( _DataFlowNode->Name() ,
768 ToServiceParameterName ,
770 anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
773 sts = _DataFlowExecutor->ChangeInputData( _DataFlowEditor->Graph()->Name() ,
774 ToServiceParameterName ,
776 anInPort = _DataFlowEditor->Graph()->GetChangeInPort( ToServiceParameterName ) ;
778 if ( sts && anInPort ) {
779 if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
781 beginService( "CNode_Impl::Input" );
785 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
786 instanceName() , interfaceName() ,
789 // ToServiceParameterName ,
790 (GraphBase::Port * ) anInPort ,
793 PortableServer::ObjectId * id = myPort->getId() ;
794 CORBA::Object_var obj = _poa->id_to_reference(*id);
795 iobject = SUPERV::Port::_narrow(obj) ;
796 anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
799 iobject = anInPort->ObjRef() ;
804 endService( "CNode_Impl::Input" );
806 if ( CORBA::is_nil( iobject ) ) {
807 MESSAGE( "CNode_Impl::Input returns nil object _IsNode " << _IsNode << " sts " << sts << " anInPort "
810 DataFlowEditor()->UnValid() ;
811 return SUPERV::Port::_duplicate( iobject ) ;
815 bool CNode_Impl::InputOfAny( const char * ToServiceParameterName ,
816 const CORBA::Any & aValue ) {
817 beginService( "CNode_Impl::InputOfAny" );
818 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
819 bool RetVal = false ;
820 MESSAGE( pthread_self() << "CNode_Impl::InputOfAny " << Name() << "(" << ToServiceParameterName << ")" ) ;
821 if ( !_DataFlowEditor->IsEditing() && _DataFlowExecutor && _DataFlowEditor->Graph()->GraphMacroLevel() ) {
823 GraphBase::OutPort * anOutPort ;
824 anOutPort = _DataFlowExecutor->Graph()->GetChangeInDataNodePort( ToServiceParameterName ) ;
825 MESSAGE( pthread_self() << "CNode_Impl::InputOfAny " << _DataFlowExecutor->Graph()->Name() << " " << ToServiceParameterName
826 << " " << anOutPort->State() << " Done " << anOutPort->Done() ) ;
827 RetVal = _DataFlowExecutor->AddInputData( _DataFlowExecutor->Graph()->Name() ,
828 ToServiceParameterName ,
830 anOutPort->State( SUPERV::ReadyState ) ;
831 anOutPort->Done( true ) ;
832 GraphExecutor::InNode * anInNode = (GraphExecutor::InNode * ) _DataFlowExecutor->Graph()->GetChangeGraphNode( anOutPort->InPorts( 0 )->NodeName() )->GetInNode() ;
833 MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name() << "->SendSomeDataReady( "
834 << _DataFlowExecutor->Graph()->Name() << " ) " ) ;
835 anInNode->SendSomeDataReady( _DataFlowExecutor->Graph()->Name() ) ;
836 if ( anInNode->IsReady() ) {
837 MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name()
838 << "->SendEvent( GraphExecutor::ExecuteEvent ) "
839 << " " << anInNode->Name() << "->IsReady() " << anInNode->IsReady() << " State "
840 << anInNode->State() ) ;
841 if ( anInNode->IsLockedDataWait() ) {
842 MESSAGE( pthread_self() << "CNode_Impl::InputOfAny : " << anInNode->Name()
843 << " IsLockedDataWait() ==> UnLockDataWait" ) ;
844 anInNode->UnLockDataWait() ;
846 anInNode->CreateNewThread( true ) ;
847 anInNode->SendEvent( GraphExecutor::ExecuteEvent ) ;
848 _DataFlowExecutor->State( GraphExecutor::ExecutingState ) ;
852 endService( "CNode_Impl::InputOfAny" );
857 SUPERV::Port_ptr CNode_Impl::GetInPort( const char *aParameterName ) {
858 SUPERV::Port_ptr Inobject = SUPERV::Port::_nil() ;
859 Port_Impl * myInPort = NULL ;
860 GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( aParameterName ) ;
861 if ( anInPort && !anInPort->IsDataStream() ) {
862 Inobject = anInPort->ObjRef() ;
863 if ( CORBA::is_nil( Inobject ) ) {
864 myInPort = new Port_Impl( _Orb , _Poa , _ContId ,
865 instanceName() , interfaceName() ,
868 (GraphBase::Port * ) anInPort ,
871 PortableServer::ObjectId * id = myInPort->getId() ;
872 CORBA::Object_var obj = _poa->id_to_reference(*id) ;
873 Inobject = SUPERV::Port::_narrow(obj) ;
874 anInPort->ObjRef( SUPERV::Port::_duplicate( Inobject ) ) ;
878 return SUPERV::Port::_duplicate( Inobject ) ;
881 SUPERV::Port_ptr CNode_Impl::GetOutPort( const char *aParameterName ) {
882 Port_Impl * myOutPort = NULL ;
883 SUPERV::Port_ptr Outobject = SUPERV::Port::_nil() ;
884 GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeOutPort( aParameterName ) ;
885 if ( anOutPort && !anOutPort->IsDataStream() ) {
886 Outobject = anOutPort->ObjRef() ;
887 if ( CORBA::is_nil( Outobject ) ) {
888 const CORBA::Any * anAny = anOutPort->Value() ;
889 myOutPort = new Port_Impl( _Orb , _Poa , _ContId ,
890 instanceName() , interfaceName() ,
893 (GraphBase::Port * ) anOutPort ,
897 PortableServer::ObjectId * id = myOutPort->getId() ;
898 CORBA::Object_var obj = _poa->id_to_reference(*id) ;
899 Outobject = SUPERV::Port::_narrow(obj) ;
900 anOutPort->ObjRef( SUPERV::Port::_duplicate( Outobject ) ) ;
904 return SUPERV::Port::_duplicate( Outobject );
907 SUPERV::StreamPort_ptr CNode_Impl::GetInStreamPort( const char *aParameterName ) {
908 SUPERV::StreamPort_ptr Inobject = SUPERV::StreamPort::_nil() ;
909 if ( DataFlowEditor()->Graph()->IsDataStreamNode() ) {
910 StreamPort_Impl * myInStreamPort = NULL ;
911 GraphBase::InPort * anInPort = DataFlowNode()->GetChangeInPort( aParameterName ) ;
912 if ( anInPort && anInPort->IsDataStream() ) {
913 Inobject = SUPERV::StreamPort::_narrow( anInPort->ObjRef() ) ;
914 if ( CORBA::is_nil( Inobject ) ) {
915 myInStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
916 instanceName() , interfaceName() ,
919 (GraphBase::Port * ) anInPort ,
921 if ( myInStreamPort ) {
922 PortableServer::ObjectId * id = myInStreamPort->getId() ;
923 CORBA::Object_var obj = _poa->id_to_reference(*id) ;
924 Inobject = SUPERV::StreamPort::_narrow(obj) ;
925 anInPort->ObjRef( SUPERV::StreamPort::_duplicate( Inobject ) ) ;
930 return SUPERV::StreamPort::_duplicate( Inobject ) ;
933 SUPERV::StreamPort_ptr CNode_Impl::GetOutStreamPort( const char *aParameterName ) {
934 StreamPort_Impl * myOutStreamPort = NULL ;
935 SUPERV::StreamPort_ptr Outobject = SUPERV::StreamPort::_nil() ;
936 if ( DataFlowEditor()->Graph()->IsDataStreamNode() ) {
937 GraphBase::OutPort * anOutPort = DataFlowNode()->GetChangeOutPort( aParameterName ) ;
938 if ( anOutPort && anOutPort->IsDataStream() ) {
939 Outobject = SUPERV::StreamPort::_narrow( anOutPort->ObjRef() ) ;
940 if ( CORBA::is_nil( Outobject ) ) {
941 const CORBA::Any * anAny = anOutPort->Value() ;
942 myOutStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
943 instanceName() , interfaceName() ,
946 (GraphBase::Port * ) anOutPort ,
949 if ( myOutStreamPort ) {
950 PortableServer::ObjectId * id = myOutStreamPort->getId() ;
951 CORBA::Object_var obj = _poa->id_to_reference(*id) ;
952 Outobject = SUPERV::StreamPort::_narrow(obj) ;
953 anOutPort->ObjRef( SUPERV::StreamPort::_duplicate( Outobject ) ) ;
958 return SUPERV::StreamPort::_duplicate( Outobject );
961 bool CNode_Impl::HasStreamPort() {
962 bool RetVal = false ;
963 beginService( "CNode_Impl::HasStreamPort" );
964 endService( "CNode_Impl::HasStreamPort" );
968 SUPERV::Link_ptr CNode_Impl::GetLink(const char * ToServiceParameterName ) {
970 SUPERV::Link_var iobject = SUPERV::Link::_nil() ;
972 char* FromServiceParameterName ;
973 bool status = _DataFlowEditor->GetLink( _DataFlowNode->Name() ,
974 ToServiceParameterName ,
976 & FromServiceParameterName ) ;
978 GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
979 if ( !anInPort->IsDataStream() && anInPort->GetOutPort() ) {
980 GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ;
981 if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
983 beginService( "CNode_Impl::GetLink" );
987 Link_Impl * myLink = new Link_Impl( _Orb , _Poa , _ContId ,
988 instanceName() , interfaceName() ,
991 ToServiceParameterName ,
992 (GraphEditor::InNode *) _DataFlowEditor->Graph()->GetChangeGraphNode( FromNodeName )->GetInNode() ,
993 FromServiceParameterName ,
994 true , false , Success ) ;
996 PortableServer::ObjectId * id = myLink->getId() ;
997 CORBA::Object_var obj = _poa->id_to_reference(*id);
998 iobject = SUPERV::Link::_narrow(obj) ;
999 anOutPort->AddInPortObjRef( anInPort , SUPERV::Link::_duplicate( iobject ) ) ;
1003 iobject = anOutPort->InPortObjRef( anInPort ) ;
1008 endService( "CNode_Impl::GetLink" );
1010 return SUPERV::Link::_duplicate( iobject ) ;
1013 SUPERV::StreamLink_ptr CNode_Impl::GetStreamLink(const char * ToServiceParameterName ) {
1015 SUPERV::StreamLink_var iobject = SUPERV::StreamLink::_nil() ;
1016 char* FromNodeName ;
1017 char* FromServiceParameterName ;
1018 if ( DataFlowEditor()->Graph()->IsDataStreamNode() ) {
1019 bool status = _DataFlowEditor->GetLink( _DataFlowNode->Name() ,
1020 ToServiceParameterName ,
1022 & FromServiceParameterName ) ;
1024 GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( ToServiceParameterName ) ;
1025 if ( anInPort->IsDataStream() && anInPort->GetOutPort() ) {
1026 GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ;
1027 if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
1029 beginService( "CNode_Impl::GetLink" );
1033 StreamLink_Impl * myStreamLink = new StreamLink_Impl(
1034 _Orb , _Poa , _ContId ,
1035 instanceName() , interfaceName() ,
1038 ToServiceParameterName ,
1039 (GraphEditor::InNode *) _DataFlowEditor->Graph()->GetChangeGraphNode( FromNodeName )->GetInNode() ,
1040 FromServiceParameterName ,
1043 PortableServer::ObjectId * id = myStreamLink->getId() ;
1044 CORBA::Object_var obj = _poa->id_to_reference(*id);
1045 iobject = SUPERV::StreamLink::_narrow(obj) ;
1046 anOutPort->AddInPortObjRef( anInPort , SUPERV::StreamLink::_duplicate( iobject ) ) ;
1050 iobject = SUPERV::StreamLink::_narrow( anOutPort->InPortObjRef( anInPort ) ) ;
1056 endService( "CNode_Impl::GetLink" );
1058 return SUPERV::StreamLink::_duplicate( iobject ) ;
1061 SUPERV::ListOfPorts * CNode_Impl::Ports() {
1065 SUPERV::ListOfPorts_var RetVal = new SUPERV::ListOfPorts ;
1067 for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) {
1068 GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ;
1069 if ( !anInPort->IsDataStream() ) {
1071 beginService( "CNode_Impl::Ports" );
1074 if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() &&
1075 ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
1076 // MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
1078 else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
1079 // MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
1080 // << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
1081 // << "/" << anInPort->IsNotConnected() ) ;
1082 Port_Impl * myPort ;
1083 if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) {
1084 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
1085 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
1086 instanceName() , interfaceName() ,
1089 (GraphBase::Port * ) anInPort ,
1094 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
1095 instanceName() , interfaceName() ,
1098 (GraphBase::Port * ) anInPort ,
1101 PortableServer::ObjectId * id = myPort->getId() ;
1102 CORBA::Object_var obj = _poa->id_to_reference(*id);
1103 SUPERV::Port_var iobject ;
1104 iobject = SUPERV::Port::_narrow(obj) ;
1106 RetVal->length( PortCount ) ;
1107 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( iobject ) ;
1108 anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
1111 // MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ;
1113 RetVal->length( PortCount ) ;
1114 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ;
1118 // MESSAGE( "InPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
1121 for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) {
1122 GraphBase::OutPort * anOutPort = _DataFlowNode->GetChangeNodeOutPort( i ) ;
1123 if ( !anOutPort->IsDataStream() ) {
1125 beginService( "CNode_Impl::Ports" );
1128 if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() &&
1129 ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
1130 // MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
1132 else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
1133 // MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
1134 const CORBA::Any * anAny = anOutPort->Value() ;
1135 Port_Impl * myPort = new Port_Impl( _Orb , _Poa , _ContId ,
1136 instanceName() , interfaceName() ,
1139 (GraphBase::Port * ) anOutPort ,
1142 PortableServer::ObjectId * id = myPort->getId() ;
1143 CORBA::Object_var obj = _poa->id_to_reference(*id);
1144 SUPERV::Port_var iobject ;
1145 iobject = SUPERV::Port::_narrow(obj) ;
1147 RetVal->length( PortCount ) ;
1148 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( iobject ) ;
1149 anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
1152 // MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
1154 RetVal->length( PortCount ) ;
1155 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ;
1159 // MESSAGE( "OutPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " IsDataStream" ) ;
1164 if ( _DataFlowEditor->IsValid() ) {
1165 RetVal->length( _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() +
1166 _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ) ;
1167 for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ; i++ ) {
1168 GraphBase::OutPort * anOutPort = _DataFlowEditor->Graph()->GetChangeNodeInDataNodePort(i) ;
1169 if ( !anOutPort->IsDataStream() ) {
1170 if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
1172 beginService( "CNode_Impl::Ports" );
1175 Port_Impl * myPort ;
1176 if ( anOutPort->IsDataConnected() ) {
1177 const CORBA::Any * anAny = anOutPort->Value() ;
1178 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
1179 instanceName() , interfaceName() ,
1182 (GraphBase::Port * ) anOutPort ,
1187 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
1188 instanceName() , interfaceName() ,
1191 (GraphBase::Port * ) anOutPort ,
1194 PortableServer::ObjectId * id = myPort->getId() ;
1195 CORBA::Object_var obj = _poa->id_to_reference(*id);
1196 SUPERV::Port_var iobject ;
1197 iobject = SUPERV::Port::_narrow(obj) ;
1199 RetVal->length( PortCount ) ;
1200 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( iobject ) ;
1201 anOutPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
1205 RetVal->length( PortCount ) ;
1206 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anOutPort->ObjRef() ) ;
1212 j = _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ;
1213 for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ; i++ ) {
1214 GraphBase::InPort * anInPort = _DataFlowEditor->Graph()->GetChangeNodeOutDataNodePort(i) ;
1215 if ( !anInPort->IsDataStream() ) {
1216 if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
1218 beginService( "CNode_Impl::Ports" );
1221 Port_Impl * myPort ;
1222 if ( anInPort->IsDataConnected() ) {
1223 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
1224 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
1225 instanceName() , interfaceName() ,
1228 (GraphBase::Port * ) anInPort ,
1233 myPort = new Port_Impl( _Orb , _Poa , _ContId ,
1234 instanceName() , interfaceName() ,
1240 PortableServer::ObjectId * id = myPort->getId() ;
1241 CORBA::Object_var obj = _poa->id_to_reference(*id);
1242 SUPERV::Port_var iobject ;
1243 iobject = SUPERV::Port::_narrow(obj) ;
1245 RetVal->length( PortCount ) ;
1246 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( iobject ) ;
1247 anInPort->ObjRef( SUPERV::Port::_duplicate( iobject ) ) ;
1251 RetVal->length( PortCount ) ;
1252 RetVal[ PortCount - 1 ] = SUPERV::Port::_duplicate( anInPort->ObjRef() ) ;
1261 int RetVallength = (unsigned int ) RetVal->length() ;
1262 for ( i = 0 ; i < RetVallength ; i++ ) {
1263 MESSAGE( "Port " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ;
1267 endService( "CNode_Impl::Ports " ) ;
1269 return ( RetVal._retn() ) ;
1272 SUPERV::ListOfStreamPorts * CNode_Impl::StreamPorts() {
1276 SUPERV::ListOfStreamPorts_var RetVal = new SUPERV::ListOfStreamPorts ;
1277 if ( !DataFlowEditor()->Graph()->IsDataStreamNode() ) {
1278 // MESSAGE("CNode_Impl::StreamPorts NOT a DataStreamNode" ) ;
1280 else if ( _IsNode ) {
1281 // RetVal->length( _DataFlowNode->GetNodeInPortsSize() +
1282 // _DataFlowNode->GetNodeOutPortsSize() ) ;
1283 for ( i = 0 ; i < _DataFlowNode->GetNodeInPortsSize() ; i++ ) {
1284 GraphBase::InPort * anInPort = _DataFlowNode->GetChangeNodeInPort( i ) ;
1285 if ( anInPort->IsDataStream() ) {
1287 beginService( "CNode_Impl::StreamPorts" );
1290 if ( anInPort->IsLoop() || ( anInPort->IsGate() && anInPort->IsNotConnected() &&
1291 ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
1292 MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " ignored" ) ;
1293 // RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
1295 else if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
1296 MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() << " IsExecuting "
1297 << _DataFlowEditor->IsExecuting() << " IsGate/IsConnected " << anInPort->IsGate()
1298 << "/" << anInPort->IsNotConnected() ) ;
1299 StreamPort_Impl * myStreamPort ;
1300 if ( _DataFlowNode->HasInput( anInPort->PortName() ) ) {
1301 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
1302 myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
1303 instanceName() , interfaceName() ,
1306 (GraphBase::Port * ) anInPort ,
1311 myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
1312 instanceName() , interfaceName() ,
1315 (GraphBase::Port * ) anInPort ,
1318 PortableServer::ObjectId * id = myStreamPort->getId() ;
1319 CORBA::Object_var obj = _poa->id_to_reference(*id);
1320 SUPERV::StreamPort_var iobject ;
1321 iobject = SUPERV::StreamPort::_narrow(obj) ;
1323 RetVal->length( PortCount ) ;
1324 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( iobject ) ;
1325 anInPort->ObjRef( SUPERV::StreamPort::_duplicate( iobject ) ) ;
1328 MESSAGE( "InStreamPort " << i << " " << anInPort->PortName() << " of Node " << Name() ) ;
1330 RetVal->length( PortCount ) ;
1331 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( anInPort->ObjRef() ) ) ;
1335 // RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
1338 for ( i = 0 ; i < _DataFlowNode->GetNodeOutPortsSize() ; i++ ) {
1339 GraphBase::OutPort * anOutPort = _DataFlowNode->GetChangeNodeOutPort( i ) ;
1340 if ( anOutPort->IsDataStream() ) {
1342 beginService( "CNode_Impl::StreamPorts" );
1345 if ( anOutPort->IsLoop() || ( anOutPort->IsGate() && anOutPort->IsNotConnected() &&
1346 ( _DataFlowEditor->IsExecuting() || _DataFlowEditor->IsReadOnly() ) ) ) {
1347 MESSAGE( "OutStreamPort " << i << " " << anOutPort->PortName() << " of Node " << Name() << " ignored" ) ;
1348 // RetVal[ _DataFlowNode->GetNodeInPortsSize() + i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
1350 else if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
1351 MESSAGE( "OutStreamPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
1352 const CORBA::Any * anAny = anOutPort->Value() ;
1353 StreamPort_Impl * myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
1354 instanceName() , interfaceName() ,
1357 (GraphBase::Port * ) anOutPort ,
1360 PortableServer::ObjectId * id = myStreamPort->getId() ;
1361 CORBA::Object_var obj = _poa->id_to_reference(*id);
1362 SUPERV::StreamPort_var iobject ;
1363 iobject = SUPERV::StreamPort::_narrow(obj) ;
1365 RetVal->length( PortCount ) ;
1366 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( iobject ) ;
1367 anOutPort->ObjRef( SUPERV::StreamPort::_duplicate( iobject ) ) ;
1370 MESSAGE( "OutStreamPort " << i << " " << anOutPort->PortName() << " of Node " << Name() ) ;
1372 RetVal->length( PortCount ) ;
1373 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( anOutPort->ObjRef() ) ) ;
1377 // RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
1382 if ( _DataFlowEditor->IsValid() ) {
1383 // RetVal->length( _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() +
1384 // _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ) ;
1385 for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ; i++ ) {
1386 GraphBase::OutPort * anOutPort = _DataFlowEditor->Graph()->GetChangeNodeInDataNodePort(i) ;
1387 if ( anOutPort->IsDataStream() ) {
1388 if ( CORBA::is_nil( anOutPort->ObjRef() ) ) {
1390 beginService( "CNode_Impl::StreamPorts" );
1393 StreamPort_Impl * myStreamPort ;
1394 if ( anOutPort->IsDataConnected() ) {
1395 const CORBA::Any * anAny = anOutPort->Value() ;
1396 myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
1397 instanceName() , interfaceName() ,
1400 (GraphBase::Port * ) anOutPort ,
1405 myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
1406 instanceName() , interfaceName() ,
1409 (GraphBase::Port * ) anOutPort ,
1412 PortableServer::ObjectId * id = myStreamPort->getId() ;
1413 CORBA::Object_var obj = _poa->id_to_reference(*id);
1414 SUPERV::StreamPort_var iobject ;
1415 iobject = SUPERV::StreamPort::_narrow(obj) ;
1417 RetVal->length( PortCount ) ;
1418 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( iobject ) ;
1419 anOutPort->ObjRef( SUPERV::StreamPort::_duplicate( iobject ) ) ;
1423 RetVal->length( PortCount ) ;
1424 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( anOutPort->ObjRef() ) ) ;
1428 // RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
1431 j = _DataFlowEditor->Graph()->GetNodeInDataNodePortsSize() ;
1432 for ( i = 0 ; i < _DataFlowEditor->Graph()->GetNodeOutDataNodePortsSize() ; i++ ) {
1433 GraphBase::InPort * anInPort = _DataFlowEditor->Graph()->GetChangeNodeOutDataNodePort(i) ;
1434 if ( anInPort->IsDataStream() ) {
1435 if ( CORBA::is_nil( anInPort->ObjRef() ) ) {
1437 beginService( "CNode_Impl::StreamPorts" );
1440 StreamPort_Impl * myStreamPort ;
1441 if ( anInPort->IsDataConnected() ) {
1442 const CORBA::Any * anAny = anInPort->GetOutPort()->Value() ;
1443 myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
1444 instanceName() , interfaceName() ,
1447 (GraphBase::Port * ) anInPort ,
1452 myStreamPort = new StreamPort_Impl( _Orb , _Poa , _ContId ,
1453 instanceName() , interfaceName() ,
1459 PortableServer::ObjectId * id = myStreamPort->getId() ;
1460 CORBA::Object_var obj = _poa->id_to_reference(*id);
1461 SUPERV::StreamPort_var iobject ;
1462 iobject = SUPERV::StreamPort::_narrow(obj) ;
1464 RetVal->length( PortCount ) ;
1465 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( iobject ) ;
1466 anInPort->ObjRef( SUPERV::StreamPort::_duplicate( iobject ) ) ;
1470 RetVal->length( PortCount ) ;
1471 RetVal[ PortCount - 1 ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( anInPort->ObjRef() ) ) ;
1475 // RetVal[ i ] = SUPERV::StreamPort::_duplicate( SUPERV::StreamPort::_narrow( CORBA::Object::_nil() ) ) ;
1480 // int RetVallength = (unsigned int ) RetVal->length() ;
1481 // for ( i = 0 ; i < RetVallength ; i++ ) {
1482 // MESSAGE( "StreamPort " << i << " " << RetVal[i]->Name() << " of Node " << Name() ) ;
1485 endService( "CNode_Impl::StreamPorts " ) ;
1487 return ( RetVal._retn() ) ;
1490 SUPERV::ListOfLinks * CNode_Impl::Links() {
1491 beginService( "CNode_Impl::Links" ) ;
1492 SUPERV::ListOfLinks_var RetVal = new SUPERV::ListOfLinks ;
1493 if ( _DataFlowNode ) {
1494 // MESSAGE( "CNode_Impl::Links " << DataFlowEditor() << " " << DataFlowEditor()->Graph() << " " << DataFlowEditor()->Graph()->ObjImpl() << " " << _DataFlowNode->ComputingNode() << " " << _DataFlowNode->ComputingNode()->Name() ) ;
1495 RetVal = DataFlowEditor()->Graph()->ObjImpl()->Links( _DataFlowNode->ComputingNode() , NULL ) ;
1498 RetVal = DataFlowEditor()->Graph()->ObjImpl()->Links( NULL , NULL ) ;
1500 MESSAGE( "CNode_Impl::Links " << RetVal->length() << " Links" ) ;
1501 endService( "CNode_Impl::Links" ) ;
1502 return ( RetVal._retn() ) ;
1505 SUPERV::ListOfStreamLinks * CNode_Impl::StreamLinks() {
1506 beginService( "CNode_Impl::StreamLinks" ) ;
1507 SUPERV::ListOfStreamLinks_var RetVal = new SUPERV::ListOfStreamLinks ;
1508 if ( _DataFlowNode && DataFlowEditor()->Graph()->IsDataStreamNode() ) {
1509 RetVal = ((StreamGraph_Impl *) (DataFlowEditor()->StreamGraph()->ObjImpl()))->StreamLinks( _DataFlowNode->ComputingNode() , NULL ) ;
1511 else if ( DataFlowEditor()->Graph()->IsDataStreamNode() ) {
1512 RetVal = ((StreamGraph_Impl *) (DataFlowEditor()->StreamGraph()->ObjImpl()))->StreamLinks( NULL , NULL ) ;
1514 MESSAGE( "CNode_Impl::StreamLinks " << RetVal->length() << " StreamLinks" ) ;
1515 endService( "CNode_Impl::StreamLinks" ) ;
1516 return ( RetVal._retn() ) ;
1519 long CNode_Impl::SubGraph() {
1520 // beginService( "CNode_Impl::SubGraph" );
1523 RetVal = _DataFlowNode->SubGraph() ;
1525 // endService( "CNode_Impl::SubGraph" );
1529 long CNode_Impl::SubStreamGraph() {
1530 // beginService( "CNode_Impl::SubStreamGraph" );
1533 RetVal = _DataFlowNode->SubStreamGraph() ;
1535 // endService( "CNode_Impl::SubStreamGraph" );
1539 bool CNode_Impl::IsLinked(const char * ServiceParameterName ) {
1540 beginService( "CNode_Impl::IsLinked" );
1541 bool RetVal = _DataFlowNode->IsLinked( ServiceParameterName ) ;
1542 MESSAGE( Name() << "->IsLinked( '" << ServiceParameterName << "' )" ) ;
1543 endService( "CNode_Impl::IsLinked" );
1547 bool CNode_Impl::HasInput(const char * ServiceParameterName ) {
1548 // beginService( "CNode_Impl::HasInput" );
1549 bool RetVal = _DataFlowNode->HasInput( ServiceParameterName ) ;
1550 // endService( "CNode_Impl::HasInput" );
1554 SUPERV::GraphState CNode_Impl::State() {
1555 // beginService( "CNode_Impl::State" );
1556 SUPERV::GraphState RetVal = SUPERV::EditingState ;
1557 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1558 if ( _DataFlowExecutor && !_DataFlowEditor->EditedAfterExecution() ) {
1559 //JR : 12/06/03 if ( _DataFlowExecutor ) {
1561 RetVal = _DataFlowExecutor->State( Name() ) ;
1564 RetVal = _DataFlowExecutor->State() ;
1567 // endService( "CNode_Impl::State" );
1570 long CNode_Impl::Thread() {
1571 // beginService( "CNode_Impl::Thread" );
1573 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1574 if ( _DataFlowExecutor ) {
1576 RetVal = _DataFlowExecutor->Thread( Name() ) ;
1579 RetVal = _DataFlowExecutor->Thread() ;
1582 // endService( "CNode_Impl::Thread" );
1585 GraphExecutor::AutomatonState CNode_Impl::AutoState() {
1586 // beginService( "CNode_Impl::AutoState" );
1587 GraphExecutor::AutomatonState RetVal = GraphExecutor::UnKnownState ;
1588 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1589 if ( _DataFlowExecutor ) {
1591 RetVal = _DataFlowExecutor->AutomatonState( Name() ) ;
1594 RetVal = _DataFlowExecutor->AutomatonState() ;
1597 // endService( "CNode_Impl::AutoState" );
1600 SUPERV::ControlState CNode_Impl::Control() {
1601 // beginService( "CNode_Impl::Control" );
1602 SUPERV::ControlState RetVal = SUPERV::VoidState ;
1603 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1604 if ( _DataFlowExecutor ) {
1606 RetVal = _DataFlowExecutor->ControlState( Name() ) ;
1609 RetVal = _DataFlowExecutor->ControlState() ;
1612 // endService( "CNode_Impl::Control" );
1615 void CNode_Impl::ControlClear() {
1616 // beginService( "CNode_Impl::ControlClear" );
1617 // SUPERV::ControlState RetVal = SUPERV::VoidState ;
1618 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1619 if ( _DataFlowExecutor ) {
1621 _DataFlowExecutor->ControlClear( Name() ) ;
1624 _DataFlowExecutor->ControlClear() ;
1627 // endService( "CNode_Impl::ControlClear" );
1631 bool CNode_Impl::IsReady() {
1632 // beginService( "CNode_Impl::IsReady" );
1633 bool RetVal = false ;
1634 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1635 if ( _DataFlowExecutor ) {
1637 RetVal = _DataFlowExecutor->IsReady( Name() ) ;
1640 RetVal = _DataFlowExecutor->IsReady() ;
1643 // endService( "CNode_Impl::IsReady" );
1647 bool CNode_Impl::IsWaiting() {
1648 // beginService( "CNode_Impl::IsWaiting" );
1649 bool RetVal = false ;
1650 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1651 if ( _DataFlowExecutor ) {
1653 RetVal = _DataFlowExecutor->IsWaiting( Name() ) ;
1656 RetVal = _DataFlowExecutor->IsWaiting() ;
1659 // endService( "CNode_Impl::IsWaiting" );
1663 bool CNode_Impl::IsRunning() {
1664 // beginService( "CNode_Impl::IsRunning" );
1665 bool RetVal = false ;
1666 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1667 if ( _DataFlowExecutor ) {
1669 RetVal = _DataFlowExecutor->IsRunning( Name() ) ;
1672 RetVal = _DataFlowExecutor->IsRunning() ;
1675 // endService( "CNode_Impl::IsRunning" );
1679 bool CNode_Impl::IsDone() {
1680 // beginService( "CNode_Impl::IsDone" );
1681 bool RetVal = false ;
1682 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1683 if ( _DataFlowExecutor ) {
1685 RetVal = _DataFlowExecutor->IsDone( Name() ) ;
1688 RetVal = _DataFlowExecutor->IsDone() ;
1691 // endService( "CNode_Impl::IsDone" );
1695 bool CNode_Impl::IsSuspended() {
1696 // beginService( "CNode_Impl::IsSuspended" );
1697 bool RetVal = false ;
1698 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1699 if ( _DataFlowExecutor ) {
1701 RetVal = _DataFlowExecutor->IsSuspended( Name() ) ;
1704 RetVal = _DataFlowExecutor->IsSuspended() ;
1707 // endService( "CNode_Impl::IsSuspended" );
1711 bool CNode_Impl::ReadyW() {
1712 // beginService( "CNode_Impl::ReadyW" );
1713 bool RetVal = false ;
1714 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1715 if ( _DataFlowExecutor ) {
1717 RetVal = _DataFlowExecutor->ReadyWait( Name() ) ;
1720 RetVal = _DataFlowExecutor->ReadyWait() ;
1723 // endService( "CNode_Impl::ReadyW" );
1727 bool CNode_Impl::RunningW() {
1728 // beginService( "CNode_Impl::RunningW" );
1729 bool RetVal = false ;
1730 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1731 if ( _DataFlowExecutor ) {
1733 RetVal = _DataFlowExecutor->RunningWait( Name() ) ;
1736 RetVal = _DataFlowExecutor->RunningWait() ;
1739 // endService( "CNode_Impl::RunningW" );
1743 bool CNode_Impl::DoneW() {
1744 // beginService( "CNode_Impl::DoneW" );
1745 bool RetVal = false ;
1746 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1747 if ( _DataFlowExecutor ) {
1749 RetVal = _DataFlowExecutor->DoneWait( Name() ) ;
1752 RetVal = _DataFlowExecutor->DoneWait() ;
1755 // endService( "CNode_Impl::DoneW" );
1759 bool CNode_Impl::SuspendedW() {
1760 // beginService( "CNode_Impl::SuspendedW" );
1761 bool RetVal = false ;
1762 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1763 if ( _DataFlowExecutor ) {
1765 RetVal = _DataFlowExecutor->SuspendedWait( Name() ) ;
1768 RetVal = _DataFlowExecutor->SuspendedWait() ;
1771 // endService( "CNode_Impl::SuspendedW" );
1775 void CNode_Impl::ping() {
1776 // beginService( "CNode_Impl::ping" );
1777 bool RetVal = false ;
1778 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1779 if ( _DataFlowExecutor ) {
1781 RetVal = _DataFlowExecutor->Ping( Name() ) ;
1787 // endService( "CNode_Impl::ping" );
1791 bool CNode_Impl::ContainerKill() {
1792 beginService( "CNode_Impl::ContainerKill" );
1793 bool RetVal = false ;
1794 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1795 if ( _DataFlowExecutor && _DataFlowEditor->IsExecuting() ) {
1797 RetVal = _DataFlowExecutor->ContainerKill( Name() ) ;
1800 RetVal = _DataFlowExecutor->ContainerKill() ;
1803 endService( "CNode_Impl::ContainerKill" );
1806 bool CNode_Impl::Kill() {
1807 beginService( "CNode_Impl::Kill" );
1808 bool RetVal = false ;
1809 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1810 if ( _DataFlowExecutor ) {
1812 RetVal = _DataFlowExecutor->Kill( Name() ) ;
1815 RetVal = _DataFlowExecutor->Kill() ;
1816 MESSAGE( "Graph execution was killed " << RetVal ) ;
1819 endService( "CNode_Impl::Kill" );
1822 bool CNode_Impl::KillDone() {
1823 // beginService( "CNode_Impl::KillDone" );
1824 bool RetVal = false ;
1825 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1826 if ( _DataFlowExecutor ) {
1828 RetVal = _DataFlowExecutor->KillDone( Name() ) ;
1831 // endService( "CNode_Impl::KillDone" );
1834 bool CNode_Impl::Stop() {
1835 // beginService( "CNode_Impl::Stop" );
1836 bool RetVal ; // = _DataFlowExecutor->Stop() ;
1837 // endService( "CNode_Impl::Stop" );
1840 bool CNode_Impl::Suspend() {
1841 beginService( "CNode_Impl::Suspend" );
1842 bool RetVal = false ;
1843 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1844 if ( _DataFlowExecutor ) {
1846 MESSAGE( "CNode_Impl::Suspend " << Name() ) ;
1847 RetVal = _DataFlowExecutor->Suspend( Name() ) ;
1850 MESSAGE( "CNode_Impl::Suspend " << _DataFlowExecutor->Graph()->Name() ) ;
1851 RetVal = _DataFlowExecutor->Suspend() ;
1854 endService( "CNode_Impl::Suspend" );
1857 bool CNode_Impl::SuspendDone() {
1858 // beginService( "CNode_Impl::SuspendDone" );
1859 bool RetVal = false ;
1860 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1861 if ( _DataFlowExecutor ) {
1863 RetVal = _DataFlowExecutor->SuspendDone( Name() ) ;
1866 RetVal = _DataFlowExecutor->SuspendDone() ;
1869 // endService( "CNode_Impl::SuspendDone" );
1872 bool CNode_Impl::Resume() {
1873 bool RetVal = false ;
1874 beginService( "CNode_Impl::Resume" );
1875 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1876 if ( _DataFlowExecutor ) {
1878 MESSAGE( "CNode_Impl::Resume " << Name() ) ;
1879 RetVal = _DataFlowExecutor->Resume( Name() ) ;
1882 MESSAGE( "CNode_Impl::Resume " << _DataFlowExecutor->Graph()->Name() ) ;
1883 RetVal = _DataFlowExecutor->Resume() ;
1886 endService( "CNode_Impl::Resume" );
1890 bool CNode_Impl::Run() {
1891 beginService( "CNode_Impl::Run" );
1892 bool RetVal = false ;
1893 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1894 MESSAGE( "CNode_Impl::Run DataFlowExecutor " << _DataFlowExecutor << Name() << " _IsNode " << _IsNode ) ;
1895 if ( _DataFlowExecutor ) {
1896 _DataFlowEditor->EditedAfterExecution( false ) ;
1898 RetVal = _DataFlowExecutor->Run( Name() , Name() , false ) ;
1901 RetVal = _DataFlowExecutor->Run( false ) ;
1904 endService( "CNode_Impl::Run" );
1908 bool CNode_Impl::ReRun() {
1909 beginService( "CNode_Impl::ReRun" );
1910 bool RetVal = false ;
1911 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1912 if ( _DataFlowExecutor ) {
1913 _DataFlowEditor->EditedAfterExecution( false ) ;
1915 RetVal = _DataFlowExecutor->Run( Name() , Name() , false ) ;
1917 else if ( DataFlowEditor()->IsEditing() ) {
1918 // RetVal = _DataFlowExecutor->Run( false ) ;
1919 return ((Graph_Impl::Graph_Impl *) this)->Graph_Impl::Run() ;
1922 endService( "CNode_Impl::ReRun" );
1926 bool CNode_Impl::ReRunAt( const char * aNodeName ) {
1927 beginService( "CNode_Impl::ReRunAt" );
1928 bool RetVal = false ;
1929 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1930 if ( _DataFlowExecutor ) {
1931 _DataFlowEditor->EditedAfterExecution( false ) ;
1933 RetVal = _DataFlowExecutor->Run( Name() , aNodeName , false ) ;
1936 endService( "CNode_Impl::ReRunAt" );
1940 bool CNode_Impl::ReStart() {
1941 beginService( "CNode_Impl::ReStart" );
1942 bool RetVal = false ;
1943 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1944 if ( _DataFlowExecutor ) {
1946 RetVal = _DataFlowExecutor->Run( Name() , Name() , true ) ;
1949 RetVal = _DataFlowExecutor->Run( true ) ;
1952 endService( "CNode_Impl::ReStart" );
1956 bool CNode_Impl::ReStartAt( const char * aNodeName ) {
1957 beginService( "CNode_Impl::ReStartAt" );
1958 bool RetVal = false ;
1959 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1960 if ( _DataFlowExecutor ) {
1962 RetVal = _DataFlowExecutor->Run( Name() , aNodeName , true ) ;
1965 endService( "CNode_Impl::ReStartAt" );
1969 long CNode_Impl::CpuUsed() {
1971 GraphExecutor::DataFlow * _DataFlowExecutor = _DataFlowEditor->Executor() ;
1972 if ( _DataFlowExecutor ) {
1974 RetVal = _DataFlowExecutor->CpuUsed( Name() ) ;
1977 RetVal = _DataFlowExecutor->CpuUsed() ;