Program: bbtk
Module: $RCSfile: bbtkComplexBlackBox.cxx,v $
Language: C++
-Date: $Date: 2008/04/22 08:29:09 $
-Version: $Revision: 1.14 $
+Date: $Date: 2008/04/22 14:30:25 $
+Version: $Revision: 1.15 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
" -> Releasing boxes"<<std::endl);
mBlackBoxMap.clear();
- /*
// Clear();
this->bbDesallocateConnectors();
- if (mLockedDescriptor)
- {
- bbtkMessage("object",3," --> Releasing descriptor"<<std::endl);
- mLockedDescriptor.reset();
- if (!mDescriptor.expired()) BlackBoxDescriptor::Release(mDescriptor);
- }
- */
+
bbtkDebugMessage("object",3,
"<== ComplexBlackBox::~ComplexBlackBox() ["
<<bbGetName()<<"]"<<std::endl);
"ComplexBlackBox::bbAllocateConnectors() ["
<<bbGetFullName()<<"]"
<<std::endl);
- /*
+
// Input connectors
const BlackBoxDescriptor::InputDescriptorMapType& imap
= bbGetDescriptor()->GetInputDescriptorMap();
->bbGetInputConnectorMap()[ d->GetInput() ];
bbGetInputConnectorMap()[i->second->GetName()] = c;
-//new BlackBoxInputConnector();
}
// Output connectors
->bbGetOutputConnectorMap()[ d->GetOutput() ];
bbGetOutputConnectorMap()[o->second->GetName()] = c;
- //new BlackBoxOutputConnector();
}
-
-*/
-
+
bbtkDebugDecTab("Kernel",8);
}
//=========================================================================
// but by the internal boxes. Hence **DO NOT** desallocate !
// just clear the maps to avoid that
// BlackBox::bbDesallocateConnectors delete the connectors
-
- /*
- bbGetInputConnectorMap().clear();
+ bbGetInputConnectorMap().clear();
bbGetOutputConnectorMap().clear();
- */
+
bbtkDebugDecTab("Kernel",8);
}
bbtkInternalError("ComplexBlackBox::bbBackwardUpdate called with caller=0");
}
+ /*
std::cout << "CBB BUP : "<<caller->GetBlackBoxFrom()->bbGetFullName()
<<"."<<caller->GetBlackBoxFromOutput()<<"----"
<<caller->GetOriginalBlackBoxFrom()->bbGetFullName()
<<"."<<caller->GetOriginalBlackBoxFromOutput()<<std::endl;
-
+ */
//=========================================================================
/// Connects the input <name> to the connection c
- void ComplexBlackBox::bbConnectInput( const std::string& name, Connection::Pointer c)
+ void ComplexBlackBox::bbConnectInput( const std::string& name, Connection* c)
{
bbtkDebugMessage("connection",2,
"==> ComplexBlackBox::bbConnectInput(\""
//=========================================================================
/// Connects the output <name> to the connection c
- void ComplexBlackBox::bbConnectOutput( const std::string& name, Connection::Pointer c)
+ void ComplexBlackBox::bbConnectOutput( const std::string& name, Connection* c)
{
bbtkDebugMessage("connection",2,
"==> ComplexBlackBox::bbConnectOutput(\""
{
if (ii->second)
{
- Connection::Pointer con = ii->second->GetConnection();
+ Connection* con = ii->second->GetConnection();
if (con!=NULL){
- BlackBox::Pointer a=con->GetBlackBoxFrom();
- BlackBox::Pointer b=con->GetBlackBoxTo();
+ BlackBox::Pointer a=con->GetOriginalBlackBoxFrom();
+ BlackBox::Pointer b=con->GetOriginalBlackBoxTo();
fprintf(ff," ");
a->bbWriteDotInputOutputName(ff,false,detail,level);
if (detail==1)
{
- fprintf(ff,":%s",con->GetBlackBoxFromOutput().c_str());
+ fprintf(ff,":%s",con->GetOriginalBlackBoxFromOutput().c_str());
}
fprintf(ff,"->");
b->bbWriteDotInputOutputName(ff,true,detail,level);
if (detail==1)
{
- fprintf(ff,":%s",con->GetBlackBoxToInput().c_str());
+ fprintf(ff,":%s",con->GetOriginalBlackBoxToInput().c_str());
}
fprintf(ff,"%s\n",";");
} // if con