using namespace std;
#include <stdio.h>
#include <fstream>
-#include <strstream>
+//#include <sstream>
#include <string>
-#include "utilities.h"
+//#include "utilities.h"
#include "ESNode_Impl.hxx"
GNode_Impl( orb , poa , contId , instanceName , interfaceName , aDataFlowEditor , FuncName , SUPERV::ListOfStrings() , NodeKindOfNode ) {
// MESSAGE( NodeName << " " );
beginService( "ESNode_Impl::ESNode_Impl" );
- if ( FuncName ) {
- cout << "ESNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName
- << " " << strlen( FuncName ) << endl ;
- }
+// if ( FuncName ) {
+// cout << "ESNode_Impl::GNode_Impl " << (void *) FuncName << " " << FuncName
+// << " " << strlen( FuncName ) << endl ;
+// }
_thisObj = this ;
_id = _poa->activate_object(_thisObj);
_Orb = CORBA::ORB::_duplicate(orb);
void ESNode_Impl::destroy() {
beginService( "ESNode_Impl::Destroy" );
if ( DataFlowEditor()->IsEditing() ) {
+// SUPERV::GNode_ptr aCoupled = SUPERV::GNode::_narrow( Coupled() ) ;
if ( Delete() ) {
_poa->deactivate_object(*_id) ;
CORBA::release(_poa) ;
delete(_id) ;
_thisObj->_remove_ref();
}
+ else {
+ MESSAGE("ESNode_Impl::destroy ERROR ") ;
+ }
+// destroy have to be used for the SwitchNode ==> destroy of the EndSwitchNode
+// if ( !CORBA::is_nil( aCoupled ) ) {
+// aCoupled->SetCoupled( "" ) ;
+// aCoupled->destroy() ;
+// }
}
endService( "ESNode_Impl::Destroy" );
}
bool ESNode_Impl::Delete() {
-// beginService( "ESNode_Impl::Delete" );
+ beginService( "ESNode_Impl::Delete" );
bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
- if ( RetVal )
- RetVal = DataFlowEditor()->IsValid() ;
+// IsValid is done in SNode_Impl::Delete
+// if ( RetVal ) {
+// RetVal = DataFlowEditor()->IsValid() ;
+// }
}
-// endService( "ESNode_Impl::Delete" );
+ endService( "ESNode_Impl::Delete" );
return RetVal ;
}