Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/11/13 10:37:27 $
- Version: $Revision: 1.27 $
+ Date: $Date: 2008/11/25 11:17:13 $
+ Version: $Revision: 1.29 $
=========================================================================*/
/* ---------------------------------------------------------------------
BlackBox::BlackBox(const std::string &name)
:
bbmStatus(MODIFIED),
+ bbmExecuting(false),
bbmName(name),
bbmBoxProcessMode("Pipeline"),
bbmParent()
BlackBox::BlackBox(BlackBox& from, const std::string &name)
:
bbmStatus(from.bbmStatus),
+ bbmExecuting(false),
bbmName(name),
bbmBoxProcessMode(from.bbmBoxProcessMode),
bbmParent()
void BlackBox::bbExecute(bool force)
{
bbtkDebugMessageInc("process",2,
- "=> BlackBox::bbExecute() ["
+ "=> BlackBox::bbExecute("<<(int)force<<") ["
<<bbGetFullName()<<"]"<<std::endl);
+ // If already executing : return
+ if (bbGetExecuting())
+ {
+ bbtkDebugMessage("process",2,
+ " -> already executing : bailing out"<<std::endl);
+ return;
+ }
// If execution frozen : return
if (bbGlobalGetFreezeExecution())
/// Copies the input / output values from another box
void BlackBox::bbCopyIOValues(BlackBox& from)
{
- bbtkDebugMessageInc("Kernel",9,
+ bbtkDebugMessageInc("Kernel",1,
"BlackBox::bbCopyIOValues("
<<from.bbGetFullName()<<") ["
<<bbGetFullName()<<"]"<<std::endl);
{
if (! i->second->GetCopyConstruct() ) continue;
std::string input = i->second->GetName();
+ bbtkDebugMessage("Kernel",2,"* Copying input "<<input<<std::endl);
this->bbSetInput(input, from.bbGetInput(input) );
}
// copies the output values
{
if (! o->second->GetCopyConstruct() ) continue;
std::string output = o->second->GetName();
+ bbtkDebugMessage("Kernel",2,"* Copying output "<<output<<std::endl);
this->bbSetOutput(output, from.bbGetOutput(output) );
}