Program: bbtk
Module: $RCSfile: bbtkBlackBox.cxx,v $
Language: C++
- Date: $Date: 2008/12/09 12:54:02 $
- Version: $Revision: 1.34 $
+ Date: $Date: 2008/12/09 13:45:13 $
+ Version: $Revision: 1.35 $
=========================================================================*/
/* ---------------------------------------------------------------------
for ( o = bbGetOutputConnectorMap().begin();
o != bbGetOutputConnectorMap().end(); ++o )
{
- // bbSetStatusAndPropagate(o->second, OUTOFDATE);
if (o->second->GetStatus()==UPTODATE)
{
o->second->SetStatus(OUTOFDATE);
}
//=========================================================================
- //=========================================================================
- void BlackBox::bbSetStatusAndPropagate(BlackBoxOutputConnector* c,
- IOStatus s)
- {
- bbtkError("bbSetStatusAndPropagate(BlackBoxOutputConnector* c,IOStatus s)");
- /*
- if (i->GetStatus()==UPTODATE)
- {
- i->second->SetStatus(s);
- i->second->SignalChange(GetThisPointer<BlackBox>(),i->first);
- }
- */
- }
- //=========================================================================
-
-
- /// Signals that the BlackBox has been modified
- /*
- void BlackBox::bbSetModifiedStatus(BlackBoxInputConnector* c)
- {
- bbtkDebugMessage("modified",1,
- "==> BlackBox::bbSetModifiedStatus("<<c<<") ["
- <<bbGetFullName()<<"]"<<std::endl);
-
- if ( (c==bbGetInputConnectorMap().find("WinHide")->second) )
- // && (bbCanReact()))
- {
- bbtkDebugMessage("modified",2,
- "-> Hide triggered by WinHide input change"
- <<std::endl);
- this->bbHideWindow();
- this->bbSetStatus(MODIFIED);
- return;
- }
- if ( (c==bbGetInputConnectorMap().find("WinClose")->second) )
- // && (bbCanReact()))
- {
- bbtkDebugMessage("modified",2,
- "-> Close triggered by WinClose input change"
- <<std::endl);
- this->bbHideWindow();
- this->bbSetStatus(MODIFIED);
- return;
- }
-
- if ( ( bbBoxProcessModeIsReactive() ||
- (c==bbGetInputConnectorMap().find("BoxExecute")->second))
- && (bbCanReact() ) )
- {
- bbtkDebugMessage("modified",2,
- "-> Execution triggered by Reactive mode or BoxExecute input change"<<std::endl);
- this->bbSetStatus(MODIFIED);
- bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
- }
-
- //else if ( bbGetStatus() == MODIFIED ) //! this->bbIsUptodate())
- // {
-// bbtkDebugMessage("modified",2,"-> Already modified"<<std::endl);
-// return;
- // }
-
- else
- {
- bbtkDebugMessage("modified",2,"-> Status set to modified"<<std::endl);
- this->bbSetStatus(MODIFIED);
- }
-
- this->bbSignalOutputModification(false);
-
- bbtkDebugMessageDec("process",5,
- "<= BlackBox::bbSetModifiedStatus("<<c<<") ["
- <<bbGetFullName()<<"]"<<std::endl);
- }
-*/
- //=========================================================================
//=========================================================================
void BlackBox::bbSignalOutputModification(bool reaction)
{
if (i->second->GetStatus()==UPTODATE)
{
- // i->second->SetStatus(MODIFIED);
i->second->SignalChange(GetThisPointer<BlackBox>(),i->first);
}
}
if (i->second->GetStatus()==UPTODATE)
{
- // i->second->SetStatus(MODIFIED);
i->second->SignalChange(GetThisPointer<BlackBox>(),i->first);
// Has to notify the output "BoxChange" also
if (output != "BoxChange")
i = bbGetOutputConnectorMap().find("BoxChange");
if ( i != bbGetOutputConnectorMap().end() )
{
- // i->second->SetStatus(MODIFIED);
i->second->SignalChange(GetThisPointer<BlackBox>(),i->first);
}
}
// Already OUTOFDATE : noting to do
if (i->second->GetStatus()==UPTODATE)
{
- // i->second->SetStatus(MODIFIED);
i->second->SignalChange(GetThisPointer<BlackBox>(),i->first);
changed = true;
}
// Already OUTOFDATE : noting to do
if (i->second->GetStatus()==UPTODATE)
{
- // i->second->SetStatus(MODIFIED);
i->second->SignalChange(GetThisPointer<BlackBox>(),i->first);
if (reaction) bbGlobalProcessExecutionList();
}