using namespace std;
#include "DataFlowBase_PortsOfNode.hxx"
+#define PortsOfNodeTrace 1
+
GraphBase::PortsOfNode::PortsOfNode() :
GraphBase::Service::Service( SALOME_ModuleCatalog::Service() ) {
// MESSAGE( "GraphBase::PortsOfNode::PortsOfNode " << this ) ;
cdebug << "DefPortsOfNode::DelInPort : _NodeInPorts[" << index << "] "
<< _NodeInPorts[ index ]->PortName() << " "
<< _NodeInPorts[ index ]->NodeName() << endl ;
+//PAL9122
+//JR Debug 08.06.2005 : RemoveOutPort was missing
+ _NodeInPorts[ index ]->RemoveOutPort() ;
if ( _NodeInPorts[ index ]->IsDataStream() ) {
DecrDataStreamInPorts() ;
}
}
GraphBase::InPort *GraphBase::PortsOfNode::GetChangeInPort( const char * name) {
-// cdebug_in << "GraphBase::PortsOfNode::GetChangeInPort " << name << endl;
+#if PortsOfNodeTrace
+ cdebug_in << "GraphBase::PortsOfNode::GetChangeInPort Service " << ServiceName()
+ << " of OutPort " << name << endl;
+#endif
GraphBase::InPort * pP = NULL;
if ( !_MapOfNodeInPorts.empty() ) {
index = _MapOfNodeInPorts[ name ] ;
}
if ( index > 0 ) {
-// cdebug << "GraphBase::PortsOfNode::GetChangeInPort _MapOfNodeInPorts[ "
-// << name << " ] : " << i-1 << " " << _NodeInPorts[ i-1 ]->NodeName()
-// << endl ;
+#if PortsOfNodeTrace
+ cdebug << "GraphBase::PortsOfNode::GetChangeInPort _MapOfNodeInPorts[ "
+ << name << " ] : " << i-1 << " " << _NodeInPorts[ i-1 ]->NodeName()
+ << endl ;
+#endif
pP = _NodeInPorts[ index-1 ] ;
}
else {
- cdebug << "GraphBase::PortsOfNode::GetChangeInPort _MapOfNodeInPorts[ "
- << name << " ] : " << index << " NOT FOUND. Known ports :" << endl ;
-#if 1
+#if PortsOfNodeTrace
+ cdebug << "GraphBase::PortsOfNode::GetChangeInPort Service " << ServiceName()
+ << " _MapOfNodeInPorts[ " << name << " ] : " << index << " NOT FOUND. Known ports :"
+ << endl ;
map< string , int >::iterator aMapOfNodeInPortsIterator ;
int i = 0 ;
for ( aMapOfNodeInPortsIterator = _MapOfNodeInPorts.begin() ;
#endif
}
}
-// cdebug_out << "GraphBase::PortsOfNode::GetChangeInPort " << endl;
+#if PortsOfNodeTrace
+ cdebug_out << "GraphBase::PortsOfNode::GetChangeInPort " << endl;
+#endif
return pP;
}
GraphBase::OutPort *GraphBase::PortsOfNode::GetChangeOutPort( const char * name ) {
-// cdebug_in << "GraphBase::PortsOfNode::GetChangeOutPort " << name << endl;
+#if PortsOfNodeTrace
+ cdebug_in << "GraphBase::PortsOfNode::GetChangeOutPort " << name << endl;
+#endif
GraphBase::OutPort * pP = NULL;
if ( !_MapOfNodeOutPorts.empty() ) {
index = _MapOfNodeOutPorts[ name ] ;
}
if ( index > 0 ) {
-// cdebug << "GraphBase::PortsOfNode::GetChangeOutPort _MapOfNodeOutPorts[ "
-// << name << " ] : " << i-1 << " " << _NodeOutPorts[ i-1 ]->NodeName() << endl ;
+#if PortsOfNodeTrace
+ cdebug << "GraphBase::PortsOfNode::GetChangeOutPort _MapOfNodeOutPorts[ "
+ << name << " ] : " << i-1 << " " << _NodeOutPorts[ i-1 ]->NodeName() << endl ;
+#endif
pP = _NodeOutPorts[ index-1 ] ;
}
else {
+#if PortsOfNodeTrace
cdebug << "GraphBase::PortsOfNode::GetChangeOutPort _MapOfNodeOutPorts[ "
<< name << " ] : " << index << " NOT FOUND. Known ports :" << endl ;
-#if 1
map< string , int >::iterator aMapOfNodeOutPortsIterator ;
int i = 0 ;
for ( aMapOfNodeOutPortsIterator = _MapOfNodeOutPorts.begin() ;
#endif
}
}
+#if PortsOfNodeTrace
+ cdebug_out << "GraphBase::PortsOfNode::GetChangeOutPort " << endl;
+#endif
return pP;
}