Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

null_renderer Class Reference

A null renderer. More...

#include <brenderer.h>

Inheritance diagram for null_renderer:

Inheritance graph
[legend]
Collaboration diagram for null_renderer:

Collaboration graph
[legend]
List of all members.

Public Methods

 null_renderer () throw ()
virtual ~null_renderer () throw ()
bool wait (int ms) throw ()
 wait for some time

int get_frame () const throw ()
virtual bool init_frame (const point &size) throw (std::exception)
 start of animation output

virtual char * lock_frame (int frame) throw (std::exception)
 lock a frame buffer

virtual bool unlock_frame () throw ()
 unlock a frame buffer

virtual bool flip_frame () throw ()
 flip a frame buffer

virtual bool set_palette (const palette &pal) throw ()
 set a new palette

virtual bool start_decode (const std::string &fname, int version, int nbframes) throw ()
 start of animation output

virtual sound_rendererget_sound_renderer () throw (std::exception)
 request for a sound_renderer

virtual bool save_current () throw ()
 debugging function : do not use


Protected Methods

void save (int frame=-1)
const std::string & get_filename () const throw ()
int get_nbframes () const throw ()
int get_width () const throw ()
int get_height () const throw ()
const palettepal () const throw ()
const char * data () const throw ()
void clean () throw ()
 memory cleanup (deletes frame buffer)

void set_frame (int f) throw ()

Detailed Description

A null renderer.

This class completely implements renderer, without actually doing anything. This class is useful for performance measurements.

Definition at line 76 of file brenderer.h.


Constructor & Destructor Documentation

null_renderer::null_renderer   throw () [inline]
 

Definition at line 80 of file brenderer.h.

virtual null_renderer::~null_renderer   throw () [inline, virtual]
 

Definition at line 81 of file brenderer.h.


Member Function Documentation

void base_renderer::clean   throw () [protected, inherited]
 

memory cleanup (deletes frame buffer)

Reimplemented in window_renderer.

Definition at line 25 of file brenderer.cpp.

const char* base_renderer::data   const throw () [inline, protected, inherited]
 

Definition at line 54 of file brenderer.h.

References base_renderer::_data.

Referenced by font_renderer::save().

bool base_renderer::flip_frame   throw () [virtual, inherited]
 

flip a frame buffer

This is called by the animation player when the current frame should be shown.

Returns:
true if everything went fine, false otherwise

Implements renderer.

Definition at line 65 of file brenderer.cpp.

const std::string& base_renderer::get_filename   const throw () [inline, protected, inherited]
 

Definition at line 49 of file brenderer.h.

References base_renderer::_fname.

int base_renderer::get_frame   const throw () [inline, inherited]
 

Definition at line 58 of file brenderer.h.

References base_renderer::_frame.

int base_renderer::get_height   const throw () [inline, protected, inherited]
 

Definition at line 52 of file brenderer.h.

References base_renderer::_height.

Referenced by font_renderer::save().

int base_renderer::get_nbframes   const throw () [inline, protected, inherited]
 

Definition at line 50 of file brenderer.h.

References base_renderer::_nbframes.

virtual sound_renderer* base_renderer::get_sound_renderer   throw (std::exception) [inline, virtual, inherited]
 

request for a sound_renderer

This is called by the animation player when sound output is required by the animation.

Returns:
a valid pointer to an uninitialized sound_renderer instance, or null if none is available.

Implements renderer.

Reimplemented in window_renderer.

Definition at line 68 of file brenderer.h.

int base_renderer::get_width   const throw () [inline, protected, inherited]
 

Definition at line 51 of file brenderer.h.

References base_renderer::_width.

Referenced by font_renderer::save().

bool base_renderer::init_frame const point   size throw (std::exception) [virtual, inherited]
 

start of animation output

This is called by the animation player when the frame size is changing.

Parameters:
size  new size of the frames.
Returns:
true if everything went fine, false otherwise

Implements renderer.

Reimplemented in bitmap_renderer, bitmap_file_renderer, and window_renderer.

Definition at line 45 of file brenderer.cpp.

Referenced by bitmap_renderer::init_frame().

char * base_renderer::lock_frame int    frame throw (std::exception) [virtual, inherited]
 

lock a frame buffer

This is called by the animation player when a frame is going to be decoded.

Parameters:
frame  the frame number.
Returns:
a pointer to the frame buffer to output data to.

Implements renderer.

Definition at line 55 of file brenderer.cpp.

const palette& base_renderer::pal   const throw () [inline, protected, inherited]
 

Definition at line 53 of file brenderer.h.

void null_renderer::save int    frame = -1 [inline, protected, virtual]
 

Implements base_renderer.

Definition at line 78 of file brenderer.h.

virtual bool renderer::save_current   throw () [inline, virtual, inherited]
 

debugging function : do not use

Returns:
true if everything went fine, false otherwise

Reimplemented in bitmap_file_renderer.

Definition at line 151 of file renderer.h.

void base_renderer::set_frame int    f throw () [inline, protected, inherited]
 

Definition at line 56 of file brenderer.h.

References base_renderer::_frame.

bool base_renderer::set_palette const palette   pal throw () [virtual, inherited]
 

set a new palette

This is called by the animation player when the palette is changing.

Parameters:
pal  new palette.
Returns:
true if everything went fine, false otherwise

Implements renderer.

Reimplemented in bitmap_renderer.

Definition at line 70 of file brenderer.cpp.

Referenced by bitmap_renderer::set_palette().

virtual bool base_renderer::start_decode const std::string &    fname,
int    version,
int    nbframes
throw () [inline, virtual, inherited]
 

start of animation output

This is called by the animation player when output is going to start.

Parameters:
fname  name of the animation being played.
version  version number of the animation
nbframes  total number of frames of the animation.
Returns:
true if initialisation was ok, false otherwise

Implements renderer.

Definition at line 67 of file brenderer.h.

References base_renderer::_fname, and base_renderer::_nbframes.

bool base_renderer::unlock_frame   throw () [virtual, inherited]
 

unlock a frame buffer

This is called by the animation player when a frame has been decoded.

Returns:
true if everything went fine, false otherwise

Implements renderer.

Definition at line 61 of file brenderer.cpp.

bool null_renderer::wait int    ms throw () [inline, virtual]
 

wait for some time

This is called by the animation player when the animation should stay idle.

Parameters:
ms  number of millisecond to wait.
Returns:
true if everything went fine, false otherwise

Implements renderer.

Definition at line 82 of file brenderer.h.


The documentation for this class was generated from the following file:
Generated on Fri Aug 9 22:54:32 2002 for san_player by doxygen1.2.16