]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkConnection.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkConnection.cxx
index 1e84edfa3d0395e3afa7da5b930913703c8d0ecf..9c8487ace1fe496f21762f539e1f6bd1bc5fc93b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkConnection.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/04/18 12:59:15 $
-  Version:   $Revision: 1.7 $
+  Date:      $Date: 2008/04/22 06:59:31 $
+  Version:   $Revision: 1.8 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -62,6 +62,11 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output,
                     <<to->bbGetName()<<"\",\""<<input<<"\")"
                     <<std::endl);    
 
+    bbtkDebugMessage("connection",1,"==> Connection::Connection(\""
+                    <<from->bbGetFullName()<<"\",\""<<output<<"\",\""
+                    <<to->bbGetFullName()<<"\",\""<<input<<"\")"
+                    <<std::endl);    
+
     
 
     if (! from->bbHasOutput(output) )
@@ -128,10 +133,7 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output,
          }
       }
 
-     // Lock this pointer !!!
-    Pointer p = MakePointer(this,true);
-    from->bbConnectOutput(output,p);
-    to->bbConnectInput(input,p);
+
     mFrom = from;
     mOriginalFrom = from;
     mTo = to;
@@ -139,7 +141,17 @@ Connection::Connection(BlackBox::Pointer from, const std::string& output,
     mInput = mOriginalInput = input;
     mOutput = mOriginalOutput = output;
 
+     // Lock this pointer !!!
+    Pointer p = MakePointer(this,true);
+    from->bbConnectOutput(output,p);
+    to->bbConnectInput(input,p);
+
     
+    bbtkDebugMessage("connection",1,"<== Connection::Connection(\""
+                    <<from->bbGetFullName()<<"\",\""<<output<<"\",\""
+                    <<to->bbGetFullName()<<"\",\""<<input<<"\")"
+                    <<std::endl);    
+
     bbtkDebugMessage("object",2,"==> Connection::Connection(\""
                     <<from->bbGetName()<<"\",\""<<output<<"\",\""
                     <<to->bbGetName()<<"\",\""<<input<<"\")"