mimas::image_output< T > Class Template Reference
[Image Output]

Abstract base-class for output sinks. More...

#include <image_output.h>

Inheritance diagram for mimas::image_output< T >:

Inheritance graph
[legend]
Collaboration diagram for mimas::image_output< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 image_output (void)
 Constructor.
virtual void write (const const_image_ref< T > &image)=0
 Write image to arbitrary sink.
 operator bool (void) const
 Indicator for output-sink being alive.
bool operator! (void) const
 Indicator for output-sink having terminated.

Protected Attributes

bool state
 State variable.

Detailed Description

template<typename T>
class mimas::image_output< T >

Abstract base-class for output sinks.

This is a base-class for output sinks. It allows to implement a program, which can write image(s) to an arbitrary output-sink. F.e.:

    using namespace mimas;
    ...
    void test( image_output< rgba< unsigned char > > &sink ) {
       image< rgba< unsigned char > > image;
       ...
       if ( sink << image ) {
          ...
       } else {
          // Output-sink has closed.
       }
      
       ...
    };
    ...

Definition at line 33 of file image_output.h.


Constructor & Destructor Documentation

template<typename T>
mimas::image_output< T >::image_output ( void   )  [inline]

Constructor.

Definition at line 37 of file image_output.h.


Member Function Documentation

template<typename T>
virtual void mimas::image_output< T >::write ( const const_image_ref< T > &  image  )  [pure virtual]

Write image to arbitrary sink.

This function is virtual and has to be overriden by the inheriting class.

Parameters:
image The image to write to the sink.

Implemented in mimas::image_fileoutput< T >, mimas::image_mesaoutput< T >, and mimas::image_mplayeroutput< T >.

template<typename T>
mimas::image_output< T >::operator bool ( void   )  const [inline]

Indicator for output-sink being alive.

Definition at line 43 of file image_output.h.

References mimas::image_output< T >::state.

template<typename T>
bool mimas::image_output< T >::operator! ( void   )  const [inline]

Indicator for output-sink having terminated.

Definition at line 45 of file image_output.h.

References mimas::image_output< T >::state.


Member Data Documentation

template<typename T>
bool mimas::image_output< T >::state [protected]

State variable.

Definition at line 48 of file image_output.h.

Referenced by mimas::image_output< T >::operator bool(), and mimas::image_output< T >::operator!().


The documentation for this class was generated from the following file:
[GNU/Linux] [Qt] [Mesa] [STL] [Lapack] [Boost] [Magick++] [Xalan-C and Xerces-C] [doxygen] [graphviz] [FFTW] [popt] [xine] [Gnuplot] [gnu-arch] [gcc] [gstreamer] [autoconf/automake/make] [freshmeat.net] [opensource.org] [sourceforge.net] [MMVL]
mimas 2.1 - Copyright Mon Oct 30 11:31:31 2006, Bala Amavasai, Stuart Meikle, Arul Selvan, Fabio Caparrelli, Jan Wedekind, Manuel Boissenin, ...