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

renderer Class Reference

interface for general output (rendering) More...

#include <renderer.h>

Inheritance diagram for renderer:

Inheritance graph
[legend]
List of all members.

Public Methods

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

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

virtual bool set_palette (const palette &pal)=0 throw (std::exception)
 set a new palette

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

virtual bool unlock_frame ()=0 throw (std::exception)
 unlock a frame buffer

virtual bool flip_frame ()=0 throw (std::exception)
 flip a frame buffer

virtual bool wait (int ms)=0 throw (std::exception)
 wait for some time

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

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


Detailed Description

interface for general output (rendering)

This is the interface for frame output. Several implementations of these interface exist, each having a particular application.

Definition at line 76 of file renderer.h.


Constructor & Destructor Documentation

virtual renderer::~renderer   [inline, virtual]
 

Definition at line 78 of file renderer.h.


Member Function Documentation

virtual bool renderer::flip_frame   throw (std::exception) [pure virtual]
 

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

Implemented in base_renderer.

virtual sound_renderer* renderer::get_sound_renderer   throw (std::exception) [pure virtual]
 

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.

Implemented in base_renderer, and window_renderer.

virtual bool renderer::init_frame const point   size throw (std::exception) [pure virtual]
 

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

Implemented in base_renderer, bitmap_renderer, bitmap_file_renderer, and window_renderer.

virtual char* renderer::lock_frame int    frame throw (std::exception) [pure virtual]
 

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.

Implemented in base_renderer.

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

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.

virtual bool renderer::set_palette const palette   pal throw (std::exception) [pure virtual]
 

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

Implemented in base_renderer, and bitmap_renderer.

Referenced by player::update_palette().

virtual bool renderer::start_decode const std::string &    fname,
int    version,
int    nbframes
throw (std::exception) [pure virtual]
 

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

Implemented in base_renderer.

virtual bool renderer::unlock_frame   throw (std::exception) [pure virtual]
 

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

Implemented in base_renderer.

virtual bool renderer::wait int    ms throw (std::exception) [pure 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

Implemented in null_renderer, font_renderer, bitmap_file_renderer, and window_renderer.


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