]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkBlackBoxOutputConnector.cxx
*** empty log message ***
[bbtk.git] / kernel / src / bbtkBlackBoxOutputConnector.cxx
index af6bf5f21ed88febf007ea7e523d198dcf525aa7..35dd02454c05431c62b10d68bfafbf3be6b39b92 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkBlackBoxOutputConnector.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/04/18 12:59:15 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2008/04/22 14:30:25 $
+  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
@@ -40,18 +40,21 @@ namespace bbtk
     bbtkDebugMessage("Kernel",9,
                     "==> BlackBoxOutputConnector::~BlackBoxOutputConnector()"
                     <<std::endl);
+    /*
     ConnectionVector::iterator i;
     for (i=mConnection.begin();
         i!=mConnection.end();
         ++i)
       (*i) = Connection::WeakPointer();
+    */
+    mConnection.clear();
     bbtkDebugMessage("Kernel",9,
                     "<== BlackBoxOutputConnector::~BlackBoxOutputConnector()"
                     <<std::endl);
   }
 
   ///
-  void BlackBoxOutputConnector::SetConnection(Connection::Pointer c)
+  void BlackBoxOutputConnector::SetConnection(Connection* c)
   {
     bbtkDebugMessage("Kernel",9,"BlackBoxOutputConnector::SetConnection("
                     <<c<<")"<<std::endl);
@@ -61,7 +64,7 @@ namespace bbtk
 
 
   ///
-  void BlackBoxOutputConnector::UnsetConnection(Connection::Pointer c)
+  void BlackBoxOutputConnector::UnsetConnection(Connection* c)
   {
     bbtkDebugMessageInc("Kernel",9,"BlackBoxOutputConnector::UnsetConnection("
                     <<c<<")"<<std::endl);
@@ -74,12 +77,12 @@ namespace bbtk
     //    c->Check();
     //Connection::WeakPointer w(c);
     ConnectionVector::iterator i;
-    //      = find(mConnection.begin(),mConnection.end(),c);
+    //  = find(mConnection.begin(),mConnection.end(),c);
     for (i=mConnection.begin();
         i!=mConnection.end();
         ++i)
       {
-       if (i->lock()==c) break;
+       if (*i==c) break;
       }
     if (i==mConnection.end())
       {
@@ -100,7 +103,7 @@ namespace bbtk
     ConnectionVector::iterator i;
     for (i=mConnection.begin();i!=mConnection.end();++i) 
       {
-       (*i).lock()->SetModifiedStatus();
+       (*i)->SetModifiedStatus();
       }
     
     bbtkDebugDecTab("Process",5);