Rudimentary RAII class of 2D Array which occupy successive memory. More...
#include <utils_array.h>
Public Types | |
typedef T | value_type |
Public Member Functions | |
T ** | data () |
vuint32_t | get_rows () const |
vuint32_t | get_cols () const |
Array2D (vuint32_t rows, vuint32_t cols, const T &val=T()) | |
Array2D (const Array2D &rhs) | |
Array2D (Array2D &&rhs) NOEXCEPT | |
Array2D & | operator= (Array2D &&rhs) NOEXCEPT |
void | swap (Array2D &left, Array2D &right) |
Array2D & | operator= (const Array2D &rhs) |
T * | operator[] (vuint32_t row) |
const T * | operator[] (vuint32_t row) const |
void | create (vuint32_t rows, vuint32_t cols, const T &val=T()) |
Rudimentary RAII class of 2D Array which occupy successive memory.
Currently not used in CCGL, but maybe in future!
Refers to: origin implementation: https://stackoverflow.com/a/21944048/4837280 and memory leak fixed: https://stackoverflow.com/a/58309862/4837280