next up previous
Next: 4.2.3.1 CrystalEyesOutput class Up: 4.2 Class Descriptions Previous: 4.2.2.4 NetworkInput class


4.2.3 Output related classes

Figure 9: An OMT class diagram showing the relationships of the output related classes.
\resizebox*{1\textwidth}{!}{\includegraphics{omt-output.eps}}

The main output class is the abstract class Output, shown with its children in Figure 9. This class defines what it is to be an output module, and all output modules will have Output as an ancestor. It defines two methods, the abstract PutImage() and the standard FinaliseImage().

The PutImage() method is called with a StereoImage object as sole parameter, and returns a boolean value indicating if the StereoImage was successfully output. A return value of false indicates that the StereoImage couldn't be output due to normal conditions, specifically, attempting to output more StereoImages than the Output object can handle.

The FinaliseImage() method is called with the final StereoImage object, when the upstream Input module returns NULL. This allows the Output module to perform any final output tasks before its destructor is called. A default implementation, of simply doing nothing, is provided in Output.

When Output objects are created they are passed the dimensions of the images they can expect to receive. This allows some state to be initialised before any images have been output, for example, creating an X11 window of the correct size.



Subsections
next up previous
Next: 4.2.3.1 CrystalEyesOutput class Up: 4.2 Class Descriptions Previous: 4.2.2.4 NetworkInput class
Kevin Pulo
2000-08-22