#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. | |
| T & | at (size_t i) |
| 1D vector-like access. | |
| const T & | at (size_t column, size_t row) const |
| 2D access. | |
| T & | at (size_t column, size_t row) |
| 2D access. | |
| 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. | |
| void | indexTo2D (size_t i, size_t &column, size_t &row) const |
| Calculate the 2D array coordinates for a given 1D index. | |
| size_type | max_size () const |
| const T & | operator() (size_t column, size_t row) const |
| 2D access. | |
| T & | operator() (size_t column, size_t row) |
| 2D access. | |
| Array2D & | operator= (const Array2D &other) |
| const T & | operator[] (size_t i) const |
| 1D vector-like access. | |
| T & | operator[] (size_t i) |
| 1D vector-like access. | |
| 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. | |
| 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 |
| icl_core::Array2D< T, TAllocator >::Array2D | ( | const allocator_type & | alloc = allocator_type() | ) | [inline, explicit] |
| icl_core::Array2D< T, TAllocator >::Array2D | ( | size_t | width, |
| size_t | height, | ||
| const value_type & | value = value_type(), |
||
| const allocator_type & | alloc = allocator_type() |
||
| ) | [inline] |
| icl_core::Array2D< T, TAllocator >::Array2D | ( | const Array2D< T, TAllocator > & | other | ) | [inline] |
| void icl_core::Array2D< T, TAllocator >::assign | ( | size_t | width, |
| size_t | height | ||
| ) | [inline] |
| void icl_core::Array2D< T, TAllocator >::assign | ( | size_t | width, |
| size_t | height, | ||
| const value_type & | value | ||
| ) | [inline] |
| const T& icl_core::Array2D< T, TAllocator >::at | ( | size_t | i | ) | const [inline] |
| T& icl_core::Array2D< T, TAllocator >::at | ( | size_t | i | ) | [inline] |
| const T& icl_core::Array2D< T, TAllocator >::at | ( | size_t | column, |
| size_t | row | ||
| ) | const [inline] |
| T& icl_core::Array2D< T, TAllocator >::at | ( | size_t | column, |
| size_t | row | ||
| ) | [inline] |
| iterator icl_core::Array2D< T, TAllocator >::begin | ( | ) | [inline] |
| const_iterator icl_core::Array2D< T, TAllocator >::begin | ( | ) | const [inline] |
| size_type icl_core::Array2D< T, TAllocator >::capacity | ( | ) | const [inline] |
| bool icl_core::Array2D< T, TAllocator >::empty | ( | ) | const [inline] |
| iterator icl_core::Array2D< T, TAllocator >::end | ( | ) | [inline] |
| const_iterator icl_core::Array2D< T, TAllocator >::end | ( | ) | const [inline] |
| allocator_type icl_core::Array2D< T, TAllocator >::get_allocator | ( | ) | const [inline] |
| size_t icl_core::Array2D< T, TAllocator >::height | ( | ) | const [inline] |
| size_t icl_core::Array2D< T, TAllocator >::index1D | ( | size_t | column, |
| size_t | row | ||
| ) | const [inline] |
| void icl_core::Array2D< T, TAllocator >::indexTo2D | ( | size_t | i, |
| size_t & | column, | ||
| size_t & | row | ||
| ) | const [inline] |
| size_type icl_core::Array2D< T, TAllocator >::max_size | ( | ) | const [inline] |
| const T& icl_core::Array2D< T, TAllocator >::operator() | ( | size_t | column, |
| size_t | row | ||
| ) | const [inline] |
| T& icl_core::Array2D< T, TAllocator >::operator() | ( | size_t | column, |
| size_t | row | ||
| ) | [inline] |
| Array2D& icl_core::Array2D< T, TAllocator >::operator= | ( | const Array2D< T, TAllocator > & | other | ) | [inline] |
| const T& icl_core::Array2D< T, TAllocator >::operator[] | ( | size_t | i | ) | const [inline] |
| T& icl_core::Array2D< T, TAllocator >::operator[] | ( | size_t | i | ) | [inline] |
| void icl_core::Array2D< T, TAllocator >::reset | ( | ) | [inline] |
| void icl_core::Array2D< T, TAllocator >::resize | ( | size_t | width, |
| size_t | height | ||
| ) | [inline] |
| void icl_core::Array2D< T, TAllocator >::resize | ( | size_t | width, |
| size_t | height, | ||
| const value_type & | value | ||
| ) | [inline] |
| void icl_core::Array2D< T, TAllocator >::set | ( | const value_type & | value | ) | [inline] |
| size_t icl_core::Array2D< T, TAllocator >::size | ( | ) | const [inline] |
| void icl_core::Array2D< T, TAllocator >::swap | ( | Array2D< T, TAllocator > & | other | ) | [inline] |
| size_t icl_core::Array2D< T, TAllocator >::width | ( | ) | const [inline] |
std::vector<T> icl_core::Array2D< T, TAllocator >::m_container [protected] |
size_t icl_core::Array2D< T, TAllocator >::m_height [protected] |
size_t icl_core::Array2D< T, TAllocator >::m_width [protected] |