]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBox.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBox.cxx
index dbba13d64ef5a35755f0609d166fc1cd80703ef9..084e5195861e7ebaf7438abe8073eb9ca986ce6c 100644 (file)
@@ -3,8 +3,8 @@
 Program:   bbtk
 Module:    $RCSfile: bbtkBlackBox.cxx,v $
 Language:  C++
-Date:      $Date: 2008/04/21 12:43:05 $
-Version:   $Revision: 1.11 $
+Date:      $Date: 2008/04/22 06:59:31 $
+Version:   $Revision: 1.12 $
                                                                                 
 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
 l'Image). All rights reserved. See doc/license.txt or
@@ -604,10 +604,13 @@ namespace bbtk
   /// Connects the input <name> to the connection c
   void BlackBox::bbConnectInput( const std::string& name, Connection::Pointer c)
   {
-    bbtkDebugMessageInc("Kernel",7,
-                       "BlackBox::bbConnectInput(\""<<name<<"\","<<c<<") ["
+    bbtkDebugMessage("connection",2,
+                       "==> BlackBox::bbConnectInput(\""
+                       <<name<<"\","<<c->GetFullName()<<") ["
                        <<bbGetFullName()<<"]"
                        <<std::endl);       
+
+
     InputConnectorMapType::iterator i = bbGetInputConnectorMap().find(name);
     if (i==bbGetInputConnectorMap().end())
       {
@@ -615,9 +618,13 @@ namespace bbtk
       }
     i->second->SetConnection(c);
     
+    bbtkDebugMessage("connection",2,
+                       "<== BlackBox::bbConnectInput(\""
+                       <<name<<"\","<<c->GetFullName()<<") ["
+                       <<bbGetFullName()<<"]"
+                       <<std::endl);       
     //  bbSetModifiedStatus();
 
-    bbtkDebugDecTab("Kernel",7);
   }
   //=========================================================================
 
@@ -626,10 +633,11 @@ namespace bbtk
   /// Connects the output <name> to the connection c
   void BlackBox::bbConnectOutput( const std::string& name, Connection::Pointer c)
   {
-    bbtkDebugMessageInc("Kernel",7,
-                       "BlackBox::bbConnectOutput(\""<<name<<"\","<<c<<") ["
-                       <<bbGetFullName()<<"]"<<std::endl);       
-
+    bbtkDebugMessage("connection",2,
+                    "==> BlackBox::bbConnectOutput(\""<<name<<"\","
+                    <<c->GetFullName()<<") ["
+                    <<bbGetFullName()<<"]"<<std::endl);       
+    
     OutputConnectorMapType::iterator i = bbGetOutputConnectorMap().find(name);
     if (i==bbGetOutputConnectorMap().end())
       {
@@ -637,7 +645,11 @@ namespace bbtk
       }
     i->second->SetConnection(c);
 
-    bbtkDebugDecTab("Kernel",7);
+    bbtkDebugMessage("connection",2,
+                    "<== BlackBox::bbConnectOutput(\""<<name<<"\","
+                    <<c->GetFullName()<<") ["
+                    <<bbGetFullName()<<"]"<<std::endl);       
+
   }
   //=========================================================================
 
@@ -646,12 +658,19 @@ namespace bbtk
   /// Disconnects the input <name> from the connection c
   void BlackBox::bbDisconnectInput( const std::string& name, Connection::Pointer c)
   {
-    if (!c) return;
-    bbtkDebugMessageInc("Kernel",7,
-                       "BlackBox::bbDisconnectInput(\""<<name
-                       <<"\","<<c<<") ["
-                       <<bbGetFullName()<<"]"
-                       <<std::endl);      
+
+    bbtkDebugMessage("connection",2,
+                    "==> BlackBox::bbDisconnectInput(\""<<name
+                    <<"\","<<c->GetFullName()<<") ["
+                    <<bbGetFullName()<<"]"
+                    <<std::endl);      
+
+    if (!c) 
+      {
+
+       bbtkDebugMessage("connection",2,"c==0"<<std::endl);     
+       return;
+      }
 
     InputConnectorMapType::iterator i = bbGetInputConnectorMap().find(name);
     if (i==bbGetInputConnectorMap().end())
@@ -660,7 +679,12 @@ namespace bbtk
       }
     i->second->UnsetConnection(c);
 
-    bbtkDebugDecTab("Kernel",7);
+    bbtkDebugMessage("connection",2,
+                    "<== BlackBox::bbDisconnectInput(\""<<name
+                    <<"\","<<c->GetFullName()<<") ["
+                    <<bbGetFullName()<<"]"
+                    <<std::endl);      
+
   }
   //=========================================================================
 
@@ -669,12 +693,17 @@ namespace bbtk
   /// Disconnects the output <name> from the connection c
   void BlackBox::bbDisconnectOutput( const std::string& name, Connection::Pointer c)
   {
-    if (!c) return;
-    bbtkDebugMessageInc("Kernel",7,
-                       "BlackBox::bbDisconnectOutput(\""<<name
-                       <<"\","<<c<<") ["
-                       <<bbGetFullName()<<"]"
-                       <<std::endl);       
+    bbtkDebugMessage("connection",2,
+                    "==> BlackBox::bbDisconnectOutput(\""<<name
+                    <<"\","<<c->GetFullName()<<") ["
+                    <<bbGetFullName()<<"]"
+                    <<std::endl);       
+    if (!c) 
+      {
+
+       bbtkDebugMessage("connection",2,"c==0"<<std::endl);     
+       return;
+      }
 
     OutputConnectorMapType::iterator i = bbGetOutputConnectorMap().find(name);
     if (i==bbGetOutputConnectorMap().end())
@@ -683,7 +712,11 @@ namespace bbtk
       }
     i->second->UnsetConnection(c);
 
-    bbtkDebugDecTab("Kernel",7);
+    bbtkDebugMessage("connection",2,
+                    "<== BlackBox::bbDisconnectOutput(\""<<name
+                    <<"\","<<c->GetFullName()<<") ["
+                    <<bbGetFullName()<<"]"
+                    <<std::endl);       
   } 
   //=========================================================================