A minimalist but handy templated class to manipulate 2D arrays of values. More...
#include <Array2D.hpp>
Public Member Functions | |
Array2D () | |
Array2D (size_t width, size_t height) | |
Array2D (const Array2D< T > &srcArray) | |
~Array2D () | |
Array2D & | operator= (const Array2D< T > &srcArray) |
const T & | operator() (size_t x, size_t y) const |
T & | operator() (size_t x, size_t y) |
size_t | width () const |
size_t | height () const |
A minimalist but handy templated class to manipulate 2D arrays of values.
Array2D allows us to create a m x n array and acces its elements through the () operator.
|
inline |
Construct an empty array.
|
inline |
Construct a width x height array.
|
inline |
Create a copy of srcArray.
|
inline |
Destroy the array
|
inline |
Return the height of the array.
|
inline |
Return the contents of the array at position (x, y)
|
inline |
Return an l-value reference to the element at position (x, y). This element can thus be modified.
|
inline |
Copy the content of srcArray into this array
|
inline |
Return the width of the array.