Worldstone
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
WorldStone::SimpleImageProvider< Color > Class Template Reference

A simple image provider that allocates a new buffer for each call to getNewImage() More...

#include <ImageView.h>

Inheritance diagram for WorldStone::SimpleImageProvider< Color >:
WorldStone::IImageProvider< Color >

Public Member Functions

ImageView< Color > getNewImage (size_t width, size_t height) override
 Allocates a new Image of dimensions width * height.
 
size_t getImagesNumber () const
 
ImageView< Color > getImage (size_t imageIndex)
 
ImageView< const Color > getImage (size_t imageIndex) const
 
Vector< Color > moveImageBuffer (size_t imageIndex)
 Move an image buffer out of the provider. More...
 

Detailed Description

template<class Color>
class WorldStone::SimpleImageProvider< Color >

A simple image provider that allocates a new buffer for each call to getNewImage()

Definition at line 140 of file ImageView.h.

Member Function Documentation

template<class Color>
ImageView<Color> WorldStone::SimpleImageProvider< Color >::getImage ( size_t  imageIndex)
inline
Returns
An ImageView of the imageIndex-th image allocated.

Definition at line 168 of file ImageView.h.

template<class Color>
ImageView<const Color> WorldStone::SimpleImageProvider< Color >::getImage ( size_t  imageIndex) const
inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 174 of file ImageView.h.

template<class Color>
size_t WorldStone::SimpleImageProvider< Color >::getImagesNumber ( ) const
inline
Returns
The number of images allocated

Definition at line 165 of file ImageView.h.

template<class Color>
Vector<Color> WorldStone::SimpleImageProvider< Color >::moveImageBuffer ( size_t  imageIndex)
inline

Move an image buffer out of the provider.

Parameters
imageIndexThe index of the image to return, in order of allocation.
Note
This means further calls to getImage(imageIndex) will return an invalid ImageView.

Definition at line 184 of file ImageView.h.


The documentation for this class was generated from the following file: