#include <Array2D.h>
Public Types | |
typedef container_type::allocator_type | allocator_type |
typedef container_type::const_iterator | const_iterator |
typedef container_type::const_pointer | const_pointer |
typedef container_type::const_reference | const_reference |
typedef container_type::const_reverse_iterator | const_reverse_iterator |
typedef std::vector< T, TAllocator > | container_type |
typedef container_type::difference_type | difference_type |
typedef container_type::iterator | iterator |
typedef container_type::pointer | pointer |
typedef container_type::reference | reference |
typedef container_type::reverse_iterator | reverse_iterator |
typedef container_type::size_type | size_type |
typedef container_type::value_type | value_type |
Public Member Functions | |
Array2D (const allocator_type &alloc=allocator_type()) | |
Array2D (size_t width, size_t height, const value_type &value=value_type(), const allocator_type &alloc=allocator_type()) | |
Array2D (const Array2D &other) | |
void | assign (size_t width, size_t height) |
void | assign (size_t width, size_t height, const value_type &value) |
const T & | at (size_t i) const |
1D vector-like access. More... | |
T & | at (size_t i) |
1D vector-like access. More... | |
const T & | at (size_t column, size_t row) const |
2D access. More... | |
T & | at (size_t column, size_t row) |
2D access. More... | |
iterator | begin () |
const_iterator | begin () const |
size_type | capacity () const |
bool | empty () const |
iterator | end () |
const_iterator | end () const |
allocator_type | get_allocator () const |
size_t | height () const |
size_t | index1D (size_t column, size_t row) const |
Calculate the 1D index for 2D array coordinates. More... | |
void | indexTo2D (size_t i, size_t &column, size_t &row) const |
Calculate the 2D array coordinates for a given 1D index. More... | |
size_type | max_size () const |
const T & | operator() (size_t column, size_t row) const |
2D access. More... | |
T & | operator() (size_t column, size_t row) |
2D access. More... | |
Array2D & | operator= (const Array2D &other) |
const T & | operator[] (size_t i) const |
1D vector-like access. More... | |
T & | operator[] (size_t i) |
1D vector-like access. More... | |
void | reset () |
void | resize (size_t width, size_t height) |
void | resize (size_t width, size_t height, const value_type &value) |
void | set (const value_type &value) |
size_t | size () const |
void | swap (Array2D &other) |
Swap this array with another one. More... | |
size_t | width () const |
Protected Attributes | |
std::vector< T > | m_container |
size_t | m_height |
size_t | m_width |
A simple 2D array using an STL vector container internally.
T | Cell data type. |
TAllocator | Optional altervative allocator passed to the underlying std::vector. |
typedef container_type::allocator_type icl_core::Array2D< T, TAllocator >::allocator_type |
typedef container_type::const_iterator icl_core::Array2D< T, TAllocator >::const_iterator |
typedef container_type::const_pointer icl_core::Array2D< T, TAllocator >::const_pointer |
typedef container_type::const_reference icl_core::Array2D< T, TAllocator >::const_reference |
typedef container_type::const_reverse_iterator icl_core::Array2D< T, TAllocator >::const_reverse_iterator |
typedef std::vector<T, TAllocator> icl_core::Array2D< T, TAllocator >::container_type |
typedef container_type::difference_type icl_core::Array2D< T, TAllocator >::difference_type |
typedef container_type::iterator icl_core::Array2D< T, TAllocator >::iterator |
typedef container_type::pointer icl_core::Array2D< T, TAllocator >::pointer |
typedef container_type::reference icl_core::Array2D< T, TAllocator >::reference |
typedef container_type::reverse_iterator icl_core::Array2D< T, TAllocator >::reverse_iterator |
typedef container_type::size_type icl_core::Array2D< T, TAllocator >::size_type |
typedef container_type::value_type icl_core::Array2D< T, TAllocator >::value_type |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |