Salome HOME
PAL9122
authorrahuel <rahuel@opencascade.com>
Tue, 30 Aug 2005 06:40:47 +0000 (06:40 +0000)
committerrahuel <rahuel@opencascade.com>
Tue, 30 Aug 2005 06:40:47 +0000 (06:40 +0000)
src/GraphBase/DataFlowBase_PortsOfNode.cxx

index 4c4c04d2e8e06698f71e25c17a2d745e091a97cd..5a5fe8ed5037d68f6ec431c46a74dc52350f3292 100644 (file)
@@ -29,6 +29,8 @@
 using namespace std;
 #include "DataFlowBase_PortsOfNode.hxx"
 
+#define PortsOfNodeTrace 1
+
 GraphBase::PortsOfNode::PortsOfNode() :
   GraphBase::Service::Service( SALOME_ModuleCatalog::Service() ) {
 //  MESSAGE( "GraphBase::PortsOfNode::PortsOfNode "  << this ) ;
@@ -478,6 +480,9 @@ void GraphBase::PortsOfNode::DelInPort( const char * InputParameterName ) {
     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() ;
     }
@@ -544,7 +549,10 @@ const GraphBase::OutPort *GraphBase::PortsOfNode::GetOutPort( const char *name)
 }
 
 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() ) {
@@ -556,15 +564,18 @@ GraphBase::InPort *GraphBase::PortsOfNode::GetChangeInPort( const char * name) {
       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() ;
@@ -575,13 +586,17 @@ GraphBase::InPort *GraphBase::PortsOfNode::GetChangeInPort( const char * name) {
 #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() ) {
@@ -593,14 +608,16 @@ GraphBase::OutPort *GraphBase::PortsOfNode::GetChangeOutPort( const char * name
       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() ;
@@ -611,6 +628,9 @@ GraphBase::OutPort *GraphBase::PortsOfNode::GetChangeOutPort( const char * name
 #endif
     }
   }
+#if PortsOfNodeTrace
+  cdebug_out << "GraphBase::PortsOfNode::GetChangeOutPort " << endl;
+#endif
   return pP;
 }