void ESNode_Impl::destroy() {
beginService( "ESNode_Impl::Destroy" );
if ( DataFlowEditor()->IsEditing() ) {
- SUPERV::GNode_ptr aCoupled = SUPERV::GNode::_narrow( Coupled() ) ;
+// SUPERV::GNode_ptr aCoupled = SUPERV::GNode::_narrow( Coupled() ) ;
if ( Delete() ) {
_poa->deactivate_object(*_id) ;
CORBA::release(_poa) ;
delete(_id) ;
_thisObj->_remove_ref();
}
- if ( !CORBA::is_nil( aCoupled ) ) {
- aCoupled->SetCoupled( "" ) ;
- aCoupled->destroy() ;
+ 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" );
+ 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 ;
}