using namespace std;
#include <stdio.h>
#include <fstream>
-#include <strstream>
+//#include <sstream>
#include <string>
-#include "utilities.h"
+//#include "utilities.h"
#include "LNode_Impl.hxx"
void LNode_Impl::destroy() {
beginService( "LNode_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("LNode_Impl::destroy ERROR ") ;
+ }
+ if ( !CORBA::is_nil( aCoupled ) ) {
+// aCoupled->SetCoupled( "" ) ; : Used in GraphBase::Graph::RemoveNode( EndLoopNode ) :
+ aCoupled->destroy() ;
+ }
+// Valid() only after deletion of the corresponding EndLoopNode :
+ DataFlowEditor()->UnValid() ;
}
endService( "LNode_Impl::Destroy" );
}
bool LNode_Impl::Delete() {
-// beginService( "LNode_Impl::Delete" );
- bool RetVal = false ;
+ beginService( "LNode_Impl::Delete" );
+ bool RetVal = false ;
if ( DataFlowEditor()->IsEditing() ) {
+ DeletePorts() ;
RetVal = DataFlowEditor()->RemoveNode( Name() ) ;
- if ( RetVal )
- RetVal = DataFlowEditor()->IsValid() ;
+// Valid() only after deletion of the corresponding EndLoopNode :
+// if ( RetVal ) {
+// RetVal = DataFlowEditor()->IsValid() ;
+// }
}
-// endService( "LNode_Impl::Delete" );
+ endService( "LNode_Impl::Delete" );
return RetVal ;
}