next up previous contents index
Next: Available Methods: Terminal Up: Terminal Previous: Construction and Destruction   Contents   Index

Specification

To fully specify a Terminal object, you must provide a definition for the following pure virtual function:

  virtual void Absorb(Visitor * v) = 0;
The Absorb() method is called when a Visitor arrives at the A-side of the Terminal. Typically a Terminal object simply queries the Visitor for relevant information and then induces the Visitor to Suicide().

Figure 5.3: Terminals: Injection and Absorption of Visitors
\begin{figure}
\begin{center}
\epsfbox{UserGuide/absorb-inject.eps}
\end{center}
\end{figure}

Additionally, derived Terminal classes may redefine the following method:

  virtual void InjectionNotification(const Visitor * v) const { }
This method is called by CASiNO immediately after a Visitor in Injected by a Terminal. Injected Visitors leave a Terminal out of side A and enter into the adjacent Conduit. InjectionNotification() gives the derived Terminal object an opportunity to observe the types of Visitors that are being Injected out of it by other Actors. Note: the implementation of InjectionNotification() may not alter or destroy the contents of the visitor.

Figure 5.4: InjectionNotification() and how it works
\begin{figure}
\begin{center}
\epsfbox{UserGuide/inject-notify.eps}
\end{center}
\end{figure}

Note that whenever you derive a Terminal class you must include

   #include <FW/actors/Terminal.h>
at some previous point in your file.
next up previous contents index
Next: Available Methods: Terminal Up: Terminal Previous: Construction and Destruction   Contents   Index
CASiNO-dev@cmf.nrl.navy.mil