namespace bbtk
{
- static bool bbmgSomeBoxExecuting = false;
- static bool bbmgFreezeExecution = false;
+ static bool bbmgSomeBoxExecuting = false;
+ static bool bbmgFreezeExecution = false;
static std::set<BlackBox::WeakPointer> bbmgExecutionList;
//=========================================================================
if (!pack.expired())
{
Package::ReleaseBlackBoxDescriptor(pack,desc);
- }
- else
- {
+ } else {
bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : descriptor package expired (was not held by a package and the box was the last instance)"<<std::endl);
}
- }
- else
- {
+ } else {
bbtkDebugMessage("object",2,"##> BlackBox::Deleter(\""<<name<<"\") : descriptor expired : nothing to do (was not held by a package or the box is a complex black box prototype)"<<std::endl);
}
bbtkDebugMessage("object",2,"<## BlackBox::Deleter(\""<<name<<"\")"<<std::endl);
std::string BlackBox::bbGetNameWithParent() const
{
if (bbmParent.lock())
- {
- return bbmParent.lock()->bbGetNameWithParent() + ":" + bbmName;
- }
- else
- {
- return bbmName;
- }
+ {
+ return bbmParent.lock()->bbGetNameWithParent() + ":" + bbmName;
+ } else {
+ return bbmName;
+ }
}
//=========================================================================
}
*/
+
OutputConnectorMapType::const_iterator o;
for ( o = bbGetOutputConnectorMap().begin();
o != bbGetOutputConnectorMap().end(); ++o )
- {
- if (o->second->GetStatus()==UPTODATE)
+ {
+
+
+ if (o->first=="BoxChange")
+ {
+ o->second->SetStatus(UPTODATE);
+ }
+
+
+
+//EED 24/08/2015
+// EED CASPITAS 2
+ if (o->second->GetStatus()==UPTODATE)
+// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==OUTOFDATE))
+// if ((o->second->GetStatus()==UPTODATE) || (o->second->GetStatus()==MODIFIED))
{
o->second->SetStatus(OUTOFDATE);
o->second->SignalChange(GetThisPointer<BlackBox>(),o->first);
- }
- }
+ } // if
+ } // for
+
if ( ( bbBoxProcessModeIsReactive()
|| (c==bbGetInputConnectorMap().find("BoxExecute")->second))
&& (bbCanReact() ) )
bbtkBlackBoxDebugMessage("change",2,
"-> Execution triggered by Reactive mode or BoxExecute input change"<<std::endl);
bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
- }
+ } // if
bbtkBlackBoxDebugMessage("change",5,
"<= BlackBox::bbSetStatusAndPropagate(input)"
<<std::endl);
<<std::endl);
// If already executing : return
- if (bbGetExecuting())
- {
- bbtkBlackBoxDebugMessage("process",3,
+ if (bbGetExecuting())
+ {
+ bbtkBlackBoxDebugMessage("process",3,
" -> already executing : abort"<<std::endl);
- return;
- }
+ return;
+ }
// If not initialized do it
bbInitializeProcessing();
IOStatus s=UPTODATE;
// IOStatus s=OUTOFDATE;
// IOStatus s=MODIFIED;
-
-
+
+
if ( ( bbBoxProcessModeIsManual()==false ) ||
( (bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==true) ) )
{
( (bbBoxProcessModeIsManual()==true)&&(bbLetRecursiveExecuteManualMode==true) )
)
{
+// printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() );
this->bbProcess();
+// printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() );
} // Manual analysis
//EED ups if ((bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false))
//EED ups {
//EED ups bbSignalOutputModification(true);
//EED ups }
-
-
+
// Update the I/O statuses
bbComputePostProcessStatus();
- }
- else
- {
+ } else {
// Test output status...
OutputConnectorMapType::iterator o;
for ( o = bbGetOutputConnectorMap().begin();
<<"all inputs are Up-to-date but output '"
<<o->first<<"' is Out-of-date ???");
}
- }
+ } // for
bbtkBlackBoxDebugMessage("process",3," -> Up-to-date : nothing to do"
<<std::endl);
- }
+ } // if
// Shows the window if the black box has one
this->bbShowWindow();
<<std::endl);
bbmgGlobalProcessingExecutionList = false;
+
}
//=========================================================================