]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBoxInputConnector.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBoxInputConnector.cxx
index 9269ec1d1f235767faca011893777a6847fded88..5c2bd13a28f19a6c24f1767a8a936bb7c09e8cc5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxInputConnector.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/05 13:23:46 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/04/24 10:11:28 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
  */
 #include "bbtkBlackBoxInputConnector.h"
 #include "bbtkMessageManager.h"
+#include "bbtkBlackBox.h"
 
 namespace bbtk
 {
-  BlackBoxInputConnector::BlackBoxInputConnector(BlackBox* b)  
+  BlackBoxInputConnector::BlackBoxInputConnector(BlackBox::Pointer b)  
     : mBox(b), mConnection(0), mStatus(MODIFIED)
   {
     bbtkDebugMessage("Kernel",9,"BlackBoxInputConnector::BlackBoxInputConnector()"<<std::endl);
@@ -35,7 +36,6 @@ namespace bbtk
   BlackBoxInputConnector::~BlackBoxInputConnector() 
   {
     bbtkDebugMessageInc("Kernel",9,"BlackBoxInputConnector::~BlackBoxInputConnector()"<<std::endl);
-    if (mConnection) delete mConnection;
     bbtkDebugDecTab("Kernel",9);
   }
   
@@ -49,15 +49,15 @@ namespace bbtk
   { 
     bbtkDebugMessage("Kernel",9,"BlackBoxInputConnector::UnsetConnection("
                     <<c<<")"<<std::endl);
-    mConnection = 0; 
+    mConnection = 0; //.reset();
   }
   
   IOStatus BlackBoxInputConnector::BackwardUpdate()
   {
-    bbtkDebugMessageInc("Process",4,"BlackBoxInputConnector::BackwardUpdate()"
-                       <<std::endl);
+    bbtkDebugMessage("process",9,"==> BlackBoxInputConnector::BackwardUpdate()"
+                    <<std::endl);
 
-    if (mConnection) 
+    if (mConnection) //.lock()) 
       {
        IOStatus s = mConnection->BackwardUpdate();
        mStatus = s;
@@ -67,8 +67,6 @@ namespace bbtk
        mStatus = UPTODATE;
       }
 
-    bbtkDecTab("Process",4);
-
     return mStatus;
 
   }