+ if (bbmInitialized)
+ {
+ bbtkBlackBoxDebugMessage("process",2,"** Finalize processing"
+ <<std::endl);
+ this->bbRecursiveFinalizeProcessing();
+ bbmInitialized = false;
+ }
+ }
+ //=========================================================================
+
+
+ //=========================================================================
+ void BlackBox::bbRecursiveExecute( Connection::Pointer caller )
+ {
+ bbtkBlackBoxDebugMessage("process",3,
+ "=> BlackBox::bbRecursiveExecute("
+ <<(caller?caller->GetFullName():"0")<<")"
+ <<std::endl);
+
+ // If already executing : return
+ if (bbGetExecuting())
+ {
+ bbtkBlackBoxDebugMessage("process",3,
+ " -> already executing : abort"<<std::endl);
+ return;
+ }
+
+ // If not initialized do it
+ bbInitializeProcessing();
+
+ bbSetExecuting(true);
+ bool wasExecuting = bbGlobalGetSomeBoxExecuting();
+ bbGlobalSetSomeBoxExecuting(true);
+
+ // Creates the window if the black box has one
+ this->bbCreateWindow();
+
+ // Updates its inputs
+ IOStatus s = bbUpdateInputs();
+
+ if ( (s != UPTODATE) ||
+ bbBoxProcessModeIsAlways() )
+ {
+ // Displays the window (WxBlackbox)
+ // bbShowWindow(caller);
+
+ // Actual processing (virtual)
+ this->bbProcess();
+
+
+ // Update the I/O statuses
+ bbComputePostProcessStatus();
+ }
+ else
+ {
+ // Test output status...
+ OutputConnectorMapType::iterator o;
+ for ( o = bbGetOutputConnectorMap().begin();
+ o!= bbGetOutputConnectorMap().end(); ++o)
+ {
+ if (o->second->GetStatus() != UPTODATE)
+ {
+ bbtkWarning("BlackBox::bbRecursiveExecute: "
+ <<"all inputs are Up-to-date but output '"
+ <<o->first<<"' is Out-of-date ???");
+ }
+ }
+
+ bbtkBlackBoxDebugMessage("process",3," -> Up-to-date : nothing to do"
+ <<std::endl);
+ }
+
+ // Shows the window if the black box has one
+ this->bbShowWindow();
+
+
+ bbtkBlackBoxDebugMessage("process",3,
+ "<= BlackBox::bbRecursiveExecute()"
+ <<std::endl);
+
+ bbSetExecuting(false);
+ bbGlobalSetSomeBoxExecuting(wasExecuting);
+
+ return;
+
+ }
+ //=========================================================================
+
+
+
+
+
+ //=========================================================================
+ IOStatus BlackBox::bbUpdateInputs()
+ {
+ bbtkBlackBoxDebugMessage("process",4,
+ "=> BlackBox::bbUpdateInputs()"