+Each output of a black box instance also has a Status,
+of type IOStatus but which can only take the two values:
+\begin{itemize}
+\item UPTODATE (==0): The output is up-to-date (the box does not need to be reprocessed).
+\item OUTOFDATE (==2): [Initial value on construction] The output is out-of-date (the box needs to be reprocessed).
+\end{itemize}
+The status of an output is stored by the class BlackBoxOutputConnector.
+
+If a box output 'O' is connected to another box input 'I' then there are some consistency constraints on their I/O statuses:
+
+\begin{tabular}{|l|p{10cm}|}
+\hline
+If & then \\ \hline
+'I' is UPTODATE & 'O' is necesseraly UPTODATE\\
+'I' is MODIFIED & 'O' is necesseraly UPTODATE\\
+'I' is OUTOFDATE & 'O' can be in any Status (The case 'O' is UPTODATE occurs for example when the amont box was created and executed - hence setting its outputs UPTODATE - *BEFORE* being connected to the aval box)\\ \hline
+'O' is UPTODATE & 'I' can be in any Status\\
+'O' is OUTOFDATE & 'I' is necessarly OUTOFDATE\\ \hline
+\end{tabular}
+
+The status of an input can be modified:
+\begin{itemize}
+\item By BlackBox::bbSetStatusAndPropagate which is called by:
+\begin{itemize}
+\item BlackBox::bbSetInput when a new value of an input is set.
+\item BlackBox::bbSignalOutputModification when the output which is connected to it is signaled as modified.
+\item BlackBox::bbConnectInput which is called when a Connection is connected to the input.
+\item Connection::OnOutputChange
+\end{itemize}
+\item By BlackBox::bbComputePostProcessStatus which is called after bbProcess in BlackBox::bbRecursiveExecute.
+\item By Connection::RecursiveExecute which is responsible for updating its amont box, transfering the output value to the input and updating the input status.
+\end{itemize}
+
+The status of an output can be modifed in:
+\begin{itemize}
+\item By BlackBox::bbSetStatusAndPropagate, when propagating the new input status to the outputs.
+\item By BlackBox::bbComputePostProcessStatus, which is called after bbProcess in BlackBox::bbRecursiveExecute.
+\end{itemize}
+
+
+% ==========================================
+\subsection{Pipeline execution}
+% ==========================================
+The main execution method of a black box is bbExecute.
+bbExecute checks werther the box is not already executing (bbGetExecuting())
+to prevent reentrance and
+checks werther the execution is not frozen (bbGlobalGetFreezeExecution()).
+If it is not the case then it calls bbRecursiveExecute which is
+the main recursive pipeline processing method of a box.
+
+bbRecursiveExecute does:
+\begin{enumerate}
+\item Update the inputs of the box calling bbUpdateInputs
+\item If at least one input is MODIFIED or OUTOFDATE or the
+BoxProcessMode is 'Always' then it:
+\begin{enumerate}
+\item Calls the virtual method bbProcess
+which is responsible for the actual box processing.
+bbProcess is overloaded in AtomicBlackBox to call a user defined method
+and in widget box descendents (WxBlackBox, KWBlackBox) to handle
+the widget creation.
+\item Compute the post-process statuses of inputs and outputs calling
+bbComputePostProcessStatus.
+\end{enumerate}
+\end{enumerate}
+\bigskip\hrule\begin{verbatim}
+void BlackBox::bbRecursiveExecute ( Connection::Pointer caller )
+{
+ // Updates the box inputs. Returns the max input IOStatus after update
+ IOStatus s = bbUpdateInputs();
+ // If at least one input is modified or BoxProcessMode=='Always'
+ if ( (s != UPTODATE) || bbBoxProcessModeIsAlways() )
+ {
+ // User process (virtual)
+ bbProcess();
+ // Compute the final status of inputs and outputs
+ bbComputePostProcessStatus();
+ }
+}
+\end{verbatim}\hrule\bigskip
+
+bbUpdateInputs iterates the InputConnectorMap of the box and
+calls RecursiveExecute on each BlackBoxInputConnector.
+It returns the max of the final status of the input connectors:
+\bigskip\hrule\begin{verbatim}
+IOStatus BlackBox::bbUpdateInputs()
+{
+ IOStatus s = UPTODATE;
+ InputConnectorMapType::iterator i;
+ for ( i = bbGetInputConnectorMap().begin();
+ i!= bbGetInputConnectorMap().end(); ++i)
+ {
+ i->second->RecursiveExecute();
+ IOStatus t = i->second->GetStatus();
+ if (t > s) s = t;
+ }
+ return s;
+}
+\end{verbatim}\hrule\bigskip
+
+bbComputPostProcessStatus computes the new status of inputs and outputs
+after box processing.
+
+The input status update rules are simple:
+
+\begin{tabular}{|lll|}
+\hline
+UPTODATE & remains & UPTODATE\\ \hline
+MODIFIED & becomes & UPTODATE\\ \hline
+OUTOFDATE & remains & OUTOFDATE\\ \hline
+\end{tabular}
+
+The new output status is:
+
+\begin{tabular}{|ll|}
+\hline
+OUTOFDATE & if any input is OUTOFDATE\\
+& or bbBoxProcessModeIsAlways() is true\\ \hline
+UPTODATE & in any other case\\ \hline
+\end{tabular}