Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
bitmap< T > Class Template Reference

#include <bitmap.h>

Public Member Functions

 bitmap (void)
 Default constructor.
 
 bitmap (size_t width, size_t height)
 Construct an empty/unitialized bitmap of size width x height.
 
 bitmap (size_t width, size_t height, const T &init)
 Construct an image of size width x height and set every pixel to 'init'.
 
 bitmap (const bitmap< T > &src)
 Copy constructor.
 
 bitmap (bitmap< T > &&src)
 Move constructor.
 
bitmap< T > & operator= (const bitmap< T > &src)
 Assignment operator.
 
bitmap< T > & operator= (bitmap< T > &&src)
 Move assignment operator.
 
void reshape (size_t width, size_t height)
 reshape the bitmap (loss of old data)
 
iterator support
const T * begin (void) const
 
const T * end (void) const
 
T * begin (void)
 
T * end (void)
 
Inspectors
size_t width () const
 
size_t height () const
 
const T & operator() (size_t x, size_t y) const
 
T & operator() (size_t x, size_t y)
 

Private Attributes

size_t _width
 
size_t _height
 
std::unique_ptr< T[]> _data
 

Constructor & Destructor Documentation

◆ bitmap() [1/5]

bitmap ( void  )
inline

Default constructor.

◆ bitmap() [2/5]

bitmap ( size_t  width,
size_t  height 
)
inline

Construct an empty/unitialized bitmap of size width x height.

◆ bitmap() [3/5]

bitmap ( size_t  width,
size_t  height,
const T &  init 
)
inline

Construct an image of size width x height and set every pixel to 'init'.

◆ bitmap() [4/5]

bitmap ( const bitmap< T > &  src)
inline

Copy constructor.

◆ bitmap() [5/5]

bitmap ( bitmap< T > &&  src)
inline

Move constructor.

Member Function Documentation

◆ begin() [1/2]

T * begin ( void  )
inline

◆ begin() [2/2]

const T * begin ( void  ) const
inline

◆ end() [1/2]

T * end ( void  )
inline

◆ end() [2/2]

const T * end ( void  ) const
inline

◆ height()

size_t height ( ) const
inline

◆ operator()() [1/2]

T & operator() ( size_t  x,
size_t  y 
)
inline

◆ operator()() [2/2]

const T & operator() ( size_t  x,
size_t  y 
) const
inline

◆ operator=() [1/2]

bitmap< T > & operator= ( bitmap< T > &&  src)
inline

Move assignment operator.

◆ operator=() [2/2]

bitmap< T > & operator= ( const bitmap< T > &  src)
inline

Assignment operator.

◆ reshape()

void reshape ( size_t  width,
size_t  height 
)
inline

reshape the bitmap (loss of old data)

◆ width()

size_t width ( ) const
inline

Member Data Documentation

◆ _data

std::unique_ptr<T[]> _data
private

◆ _height

size_t _height
private

◆ _width

size_t _width
private

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