Program: bbtk
Module: $RCSfile: bbtkConnection.cxx,v $
Language: C++
- Date: $Date: 2008/12/08 12:54:19 $
- Version: $Revision: 1.16 $
+ Date: $Date: 2008/12/11 09:50:35 $
+ Version: $Revision: 1.19 $
=========================================================================*/
/* ---------------------------------------------------------------------
//==================================================================
//==================================================================
- /// Backward Update
- void Connection::BackwardUpdate()
+ /// Recursive execution
+ void Connection::RecursiveExecute()
{
- bbtkDebugMessage("process",5,
- "===> Connection::BackwardUpdate() ["
+ bbtkDebugMessage("process",4,
+ "===> Connection::RecursiveExecute() ["
<<GetFullName()<<"]"<<std::endl);
- mFrom->bbBackwardUpdate(GetThisPointer<Connection>());
+ mFrom->bbRecursiveExecute(GetThisPointer<Connection>());
TransferData();
// Transfer status
IOStatus s = MODIFIED;
if ( mFrom->bbGetOutputConnector(mOutput).GetStatus() == OUTOFDATE)
- s = OUTOFDATE,
+ {
+ s = OUTOFDATE;
+ }
mTo->bbGetInputConnector(mInput).SetStatus(s);
-
- bbtkDebugMessage("process",5,
- "<=== Connection::BackwardUpdate() ["
+
+ bbtkDebugMessage("process",4,
+ " --> '"<<mTo->bbGetName()<<"."<<mInput
+ <<" ["<<&mTo->bbGetInputConnector(mInput)<<"] "
+ <<"' new status '"
+ <<GetIOStatusString(s)
+ <<"'"
+ << std::endl);
+
+ bbtkDebugMessage("process",4,
+ "<=== Connection::RecursiveExecute() ["
<<GetFullName()<<"]"<<std::endl);
- return; // s;
+ return;
}
//==================================================================
- /*
- //==================================================================
- /// Forward Update
- void Connection::ForwardUpdate()
- {
- bbtkDebugMessageInc("process",2,
- "Connection::ForwardUpdate() ["
- <<GetFullName()<<"]"<<std::endl);
-
- TransferData();
-
- mTo->bbForwardUpdate(this);
-
- bbtkDebugDecTab("process",2);
- }
- //==================================================================
- */
//==================================================================
/// Transfers the data from the source output to the target input
}
//==================================================================
-
- /*
- //==================================================================
- /// Modified
- void Connection::SetModifiedStatus()
- {
- bbtkDebugMessage("modified",2,
- "==> Connection::SetModifiedStatus() ["
- <<GetFullName()<<"]"<<std::endl);
-
- if (mAdaptor) mAdaptor->bbSetModifiedStatus();
-
- mTo->bbSetModifiedStatus( mTo->bbGetInputConnectorMap().find(mInput)->second );
-
-
- }
- //==================================================================
- */
+
//==================================================================
/// From.Output change propagation
void Connection::OnOutputChange(bbtk::BlackBox::Pointer, const std::string&,
IOStatus status)
{
bbtkDebugMessage("change",2,
- "==> Connection::OnOutputChange("<<status<<") ["
+ "==> Connection::OnOutputChange("
+ <<GetIOStatusString(status)<<") ["
<<GetFullName()<<"]"<<std::endl);
-
if (mAdaptor)
{
- BlackBoxInputConnector* ac = mAdaptor->bbGetInputConnectorMap().find("In")->second;
- mAdaptor->bbSetStatusAndPropagate(ac,status);
+ BlackBoxInputConnector* ac = mAdaptor->bbGetInputConnectorMap().find("In")->second;
+ mAdaptor->bbSetStatusAndPropagate(ac,status);
}
mTo->bbSetStatusAndPropagate( mTo->bbGetInputConnectorMap().find(mInput)->second, status);