using namespace std;
#include <stdio.h>
#include <fstream>
-#include <strstream>
+//#include <sstream>
#include <string>
-#include "utilities.h"
+//#include "utilities.h"
#include "Graph_Impl.hxx"
#include "Port_Impl.hxx"
beginService( "Port_Impl::Link" ) ;
begin = false ;
SUPERV::ListOfLinks_var Links = new SUPERV::ListOfLinks ;
- cout << "Port_Impl::Link " << _DataFlowNode->Name() << " "
- << _DataFlowPort->PortName() << endl ;
+// cout << "Port_Impl::Link " << _DataFlowNode->Name() << " "
+// << _DataFlowPort->PortName() << endl ;
Links = _DataFlowEditor->ObjImpl()->Links(
_DataFlowNode->ComputingNode() ,
_DataFlowPort->PortName() ) ;
GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( _DataFlowPort->PortName() ) ;
if ( anInPort->GetOutPort() ) {
GraphBase::OutPort * anOutPort = anInPort->GetOutPort() ;
- if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
+ if ( _DataFlowNode->IsEndLoopNode() && !strcmp( _DataFlowNode->CoupledNode()->Name() ,
+ anOutPort->NodeName() ) ) {
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << _DataFlowNode->Name() << "("
+// << anInPort->PortName() << ")" << " ignored" ) ;
+ }
+ else if ( CORBA::is_nil( anOutPort->InPortObjRef( anInPort ) ) ) {
if ( begin ) {
beginService( "Port_Impl::Link" ) ;
begin = false ;
bool Port_Impl::IsInput() {
// beginService( "Port_Impl::IsInput" ) ;
bool RetVal = _InputPort ;
+// MESSAGE( Name() << "IsInput() " << _InputPort ) ;
// endService( "Port_Impl::IsInput" ) ;
return RetVal ;
}
bool Port_Impl::IsLinked() {
// beginService( "Port_Impl::IsLinked" ) ;
- bool RetVal = true ;
-#if 0
- if ( _DataFlowNode->IsEndSwitchNode() && _DataFlowPort->IsBus() ) {
+ bool RetVal = false ;
+ GraphBase::InPort * anInPort = _DataFlowNode->GetChangeInPort( _DataFlowPort->PortName() ) ;
+ GraphBase::OutPort * anOutPort = NULL ;
+ if ( anInPort) {
+ anOutPort = anInPort->GetOutPort() ;
+ }
+ if ( _DataFlowNode->IsEndLoopNode() && anOutPort &&
+ !strcmp( _DataFlowNode->CoupledNode()->Name() , anOutPort->NodeName() ) ) {
+// MESSAGE( "Link " << anOutPort->NodeName() << "("
+// << anOutPort->PortName() << ") --> " << _DataFlowNode->Name() << "("
+// << anInPort->PortName() << ")" << " ignored" ) ;
}
else {
-#endif
RetVal = _DataFlowNode->IsLinked( _DataFlowPort->PortName() ) ;
-#if 0
}
-#endif
// endService( "Port_Impl::IsLinked" ) ;
return RetVal ;
}