Public Member Functions

mxgui::basic_image< T > Class Template Reference
[Mxgui level 1]

#include <image.h>

Inherits mxgui::basic_image_base< T >.

List of all members.

Public Member Functions

 basic_image (short int height, short int width, const T *data)
virtual const T * getData () const
virtual ~basic_image ()

Detailed Description

template<typename T>
class mxgui::basic_image< T >

This class is an image compiled statically with the code.

The expected use of this class is like this:

Images are immutable except they can be assigned with operator=


Constructor & Destructor Documentation

template<typename T >
mxgui::basic_image< T >::basic_image ( short int  height,
short int  width,
const T *  data 
) [inline]

Construct an Image

Parameters:
height the image's height
width the image's width
data the pointer to the image's data. Ownsership of the data is still of the caller. If the pointer points to const data no special care must be taken, otherwise the caller must free the memory when the Image is no longer useful, to avoid a memory leak.
template<typename T >
virtual mxgui::basic_image< T >::~basic_image (  )  [inline, virtual]

Virtual destructor. The pointer is not deallocated because this class is meant to keep a pointer to a non dynamically allocated image, such as to a const array in .rodata


Member Function Documentation

template<typename T >
virtual const T* mxgui::basic_image< T >::getData (  )  const [inline, virtual]
Returns:
a const pointer to the image's data

Reimplemented from mxgui::basic_image_base< T >.


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