return true ;
}
-bool GraphBase::InPort::RemoveOutPort() {
+bool GraphBase::InPort::RemoveOutPort( bool DoRemoveInPort ) {
// Before to return the real status, callers should be checked ...
if ( _OutPort == NULL ) {
cdebug << "InPort::RemoveOutPort no OutPort in InPort " << PortName() << " of " << NodeName() << endl ;
}
cdebug << "InPort::RemoveOutPort " << _OutPort->NodeName() << "(" << _OutPort->PortName() << ") --> "
<< NodeName() << "(" << PortName() << ") in InPort " << PortName() << " of " << NodeName() << endl ;
- _OutPort = NULL ;
if ( !IsEndSwitch() ) {
+//JR 08.06.2005 : RemoveOutPort <==> delete of a link ==> RemoveInPort corresponding
+ if ( DoRemoveInPort ) {
+ _OutPort->RemoveInPort( this ) ;
+ }
RemoveCoords() ;
+ _OutPort = NULL ;
}
else {
+ _OutPort = NULL ;
Kind( SUPERV::InLineParameter ) ;
}
return true ;
Kind( SUPERV::InLineParameter ) ;
}
}
- toPort->RemoveOutPort() ;
+ if ( toPort->GetOutPort() ) {
+ toPort->RemoveOutPort( false ) ;
+ }
cdebug << "OutPort::RemoveInPort " << NodeName() << "( " << PortName() << " " << PortStatus()
<< " " << Kind() << " ) _InPortsSize " << _InPortsSize << " --> "
<< toPort->NodeName() << "( " << toPort->PortName() << " " << toPort->PortStatus()
Kind( SUPERV::InLineParameter ) ;
}
}
- toPort->RemoveOutPort() ;
+ if ( toPort->GetOutPort() ) {
+ toPort->RemoveOutPort( false ) ;
+ }
return true ;
}
const char* NewNodePortName ) {
int index = _MapOfInPorts[ OldNodePortName ] ;
if ( index <= 0 || index > _InPortsSize ) {
- cdebug << "GraphBase::OutPort::ReNameInPort Error " << OldNodePortName
+ cdebug << "GraphBase::OutPort::ReNameInPort Error in Node " << NodeName() << " " << OldNodePortName
<< " --> " << NewNodePortName << " index " << index << endl ;
return false ;
}