Program: bbtk
Module: $RCSfile: bbtkAtomicBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/10/17 08:18:12 $
- Version: $Revision: 1.8 $
+ Date: $Date: 2008/11/13 14:46:43 $
+ Version: $Revision: 1.9 $
=========================================================================*/
/* ---------------------------------------------------------------------
"=> AtomicBlackBox::bbBackwardUpdate("
<<(caller?caller->GetFullName():"0")<<") ["
<<bbGetFullName()<<"]"<<std::endl);
-
+
+ // If already executing : return
+ if (bbGetExecuting())
+ {
+ bbtkDebugMessage("process",3,
+ " -> already executing : bailing out"<<std::endl);
+ return bbGetStatus();
+ }
+ bbSetExecuting(true);
+ bool wasExecuting = bbGlobalGetSomeBoxExecuting();
+ bbGlobalSetSomeBoxExecuting(true);
+
bbtkDebugMessage("process",5,"Initial Status = "<<bbGetStatus()
<<std::endl);
bbtkDebugMessage("process",5,"BoxProcessMode = "
( bbBoxProcessModeIsAlways() ) )
{
- bbSetStatus(UPDATING);
-
- bool wasExecuting = bbGlobalGetSomeBoxExecuting();
- bbGlobalSetSomeBoxExecuting(true);
+ // bbSetStatus(UPDATING);
// Updates its inputs
IOStatus s = bbUpdateInputs();
- bbtkDebugMessage("process",6,"Inputs post-update status = "<<s<<std::endl);
+ bbtkDebugMessage("process",6,"=> AtomicBlackBox::bbBackwardUpdate("
+ <<(caller?caller->GetFullName():"0")<<") ["
+ <<bbGetFullName()<<"] : Inputs post-update status = "<<s<<std::endl);
// If all inputs are in UPTODATE post-update status
// and mProcessMode is not "Always"
// then the box is now UPTODATE
// Displays the window (WxBlackbox)
bbShowWindow(caller);
- bbGlobalSetSomeBoxExecuting(wasExecuting);
}
else
bbtkDebugMessage("process",5,"Up-to-date : nothing to do"<<std::endl);
}
- bbtkDebugMessage("process",5,"Final Status = "
- <<bbGetStatus()<<std::endl);
+ bbtkDebugMessage("process",5,"=> AtomicBlackBox::bbBackwardUpdate("
+ <<(caller?caller->GetFullName():"0")<<") ["
+ <<bbGetFullName()<<"] : Final Status = "
+ <<bbGetStatus()<<std::endl);
bbtkDebugMessage("process",3,
"<= AtomicBlackBox::bbBackwardUpdate() ["
<<bbGetFullName()<<"]"<<std::endl);
+ bbSetExecuting(false);
+ bbGlobalSetSomeBoxExecuting(wasExecuting);
return bbGetStatus();