Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:12 $
- Version: $Revision: 1.25 $
+ Date: $Date: 2008/11/12 15:42:52 $
+ Version: $Revision: 1.26 $
=========================================================================*/
/* ---------------------------------------------------------------------
static bool bbmgSomeBoxExecuting = false;
static bool bbmgFreezeExecution = false;
- static std::set<BlackBox::Pointer> bbmgExecutionList;
+ static std::set<BlackBox::WeakPointer> bbmgExecutionList;
//=========================================================================
BlackBox::Deleter::Deleter()
"=> BlackBox::bbGlobalProcessExecutionList()"
<<std::endl);
- std::set<BlackBox::Pointer>::iterator i;
+ std::set<BlackBox::WeakPointer>::iterator i;
for (i=bbmgExecutionList.begin();
i!=bbmgExecutionList.end();
++i)
{
- bbtkDebugMessage("process",4,
- " -> Executing "<<(*i)->bbGetFullName()<<std::endl);
- (*i)->bbExecute(true);
+ {
+ if ((*i).lock())
+ {
+ bbtkDebugMessage("process",4,
+ " -> Executing "<<
+ (*i).lock()->bbGetFullName()<<std::endl);
+ (*i).lock()->bbExecute(true);
+ }
+ else
+ {
+ bbtkGlobalError("Strange error in BlackBox::bbGlobalProcessExecutionList() : Weak bb pointer in bbmgExecutionList is no more valid...");
+ }
+ }
}
bbmgExecutionList.clear();