#include <image_output.h>
Inheritance diagram for mimas::image_output< T >:
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. |
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.
mimas::image_output< T >::image_output | ( | void | ) | [inline] |
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.
image | The image to write to the sink. |
Implemented in mimas::image_fileoutput< T >, mimas::image_mesaoutput< T >, and mimas::image_mplayeroutput< 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.
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.
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!().