Program: bbtk
Module: $RCSfile: bbtkConnection.cxx,v $
Language: C++
- Date: $Date: 2008/04/22 08:29:09 $
- Version: $Revision: 1.9 $
+ Date: $Date: 2008/04/22 14:30:25 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
mOutput = mOriginalOutput = output;
// Lock this pointer !!!
- Pointer p = MakePointer(this,true);
- from->bbConnectOutput(output,p);
- to->bbConnectInput(input,p);
+ //Pointer p = MakePointer(this,true);
+ from->bbConnectOutput(output,this);
+ to->bbConnectInput(input,this);
bbtkDebugMessage("connection",1,"<== Connection::Connection(\""
<<GetFullName()<<"]"<<std::endl);
if (mAdaptor) mAdaptor.reset();
- mOriginalFrom.reset();
- mOriginalTo.reset();
if (mFrom!=0)
{
- mFrom->bbDisconnectOutput(mOutput,
- GetThisPointer<Connection>());
+ mFrom->bbDisconnectOutput(mOutput,this);
+ // GetThisPointer<Connection>());
+ mFrom.reset();
}
else
{
}
if (mTo!=0)
{
- mTo->bbDisconnectInput(mInput,
- GetThisPointer<Connection>());
+ mTo->bbDisconnectInput(mInput,this);// GetThisPointer<Connection>());
+ mTo.reset();
}
else
{
bbtkInternalError("Connection::~Connection() : invalid final box pointer");
}
- mFrom.reset();
- mTo.reset();
+
bbtkDebugMessage("object",2,
"<== Connection::~Connection() ["
bbtkMessage("debug",2," - From : Output '"<<mOutput
<<"' is in OutputConnectorMap"<<std::endl);
- std::vector< Connection::WeakPointer >::const_iterator j;
+ std::vector< Connection* >::const_iterator j;
+ /*
for (j = i->second->GetConnectionVector().begin();
j != i->second->GetConnectionVector().end();
++j)
{
- if ((*j).lock()==GetThisPointer<Connection>()) break;
+ if ((*j)==this) break;
}
- /*
+ */
j = find(i->second->GetConnectionVector().begin(),
i->second->GetConnectionVector().end(),
- GetThisPointer<Connection>());
- */
+ this);
+
if (j==i->second->GetConnectionVector().end())
{
bbtkError("** Checking Connection "<<(void*)this