- /*
- //=========================================================================
- /// Sets the ChangeTime of input
- void BlackBox::bbSetInputChangeTime(BlackBoxInputConnector* c,
- const ChangeTime& t)
- {
- bbtkBlackBoxDebugMessage("change",1,
- "==> BlackBox::bbSetInputChangeTime("<<c<<","<<t<<") ["
- <<bbGetFullName()<<"]"<<std::endl);
-
- // If new time is greater than old one
- if ( c->SetChangeTime(t) )
- {
- bool was_up_to_date = bbIsUpToDate();
- // If new time is greater than the old max time of inputs
- if ( mMaxInputChangeTime.Set(t) )
- {
- // If the box turned out-of-date
- if ( was_up_to_date && bbIsOutOfDate() )
- {
- //
- if ( ( bbBoxProcessModeIsReactive() ||
- (c==bbGetInputConnectorMap().find("BoxExecute")->second))
- && (bbCanReact() ) )
- {
- bbtkBlackBoxDebugMessage("change",2,
- "an input of "
- <<bbGetFullName()
- <<" changed and box is in Reactive mode or BoxExecute input changed : adding it to the global execution list"
- <<std::endl);
- bbGlobalAddToExecutionList( GetThisPointer<BlackBox>() );
- }
- // Have to propagate the modification to aval boxes
- OutputConnectorMapType::iterator i;
- for (i = bbGetOutputConnectorMap().begin();
- i != bbGetOutputConnectorMap().end();
- ++i)
- {
- i->second->SetChangeTime(t);
- }
- // update the MinOutputChangeTime
- mMinOutputChangeTime.Set(t);
- }
- }
- }
- }
- //=========================================================================
-
- //=========================================================================
- /// Sets the ChangeTime of output
- void BlackBox::bbSetOutputChangeTime(BlackBoxOutputConnector* c,
- const ChangeTime& t)
- {
- bbtkBlackBoxDebugMessage("change",1,
- "==> BlackBox::bbSetOutputChangeTime("<<c<<","<<t<<") ["
- <<bbGetFullName()<<"]"<<std::endl);
-
- //ChangeTime old =
- c->SetChangeTime(t);
- // c->GetChangeTime() = t;
- // bbUpdateMinOutputChangeTime(t);
- // propagate
-
- }
- //=========================================================================
- */
-
- /*
- //=========================================================================
- void BlackBox::bbUpdateMaxInputChangeTime(const ChangeTime& t)
- {
-
-
- if ( t > mMaxInputChangeTime )
- {
- mMaxInputChangeTime = t;
- if ( mMinOutputChangeTime > mMaxInputChangeTime )
- {
-
- }
- }
-
- }
- //=========================================================================
-
- //=========================================================================
- void bbUpdateMinOutputChangeTime(const ChangeTime& t)
- {
- ChangeTime old = mMinOutputChangeTime;
- mMinOutputChangeTime = MAXLONG;
- OutputConnectorMapType::iterator i;
- for (i = bbGetOutputConnectorMap.begin();
- i != bbGetOutputConnectorMap.end();
- ++i)
- {
- if (i->second->GetChangeTime() < mMinOutputChangeTime)
- mMinOutputChangeTime = i->second->GetChangeTime();
- }
- if ( mMinOutputChangeTime < old )
- {
- }
-
- }
- //=========================================================================
- */
-