|
Libargus API
Libargus Camera API
|
A template class to hold a 2-dimensional array of data. More...
#include <Types.h>
Public Types | |
| typedef T * | iterator |
| typedef const T * | const_iterator |
Public Member Functions | |
| Array2D () | |
| Default Constructor. | |
| Array2D (const Size2D< uint32_t > &size) | |
| Constructor given initial array size. | |
| Array2D (const Size2D< uint32_t > &size, const T &value) | |
| Constructor given initial array size and initial fill value. | |
| Array2D (const Array2D< T > &other) | |
| Copy constructor. | |
| Array2D & | operator= (const Array2D< T > &other) |
| Assignment operator. | |
| bool | operator== (const Array2D< T > &other) const |
| Equality operator. | |
| Size2D< uint32_t > | size () const |
| Returns the size (dimensions) of the array. | |
| bool | resize (const Size2D< uint32_t > &size) |
| Resize the array. | |
| const_iterator | begin () const |
| STL style iterators. | |
| const_iterator | end () const |
| iterator | begin () |
| iterator | end () |
| T & | operator[] (unsigned int i) |
| Array indexing using [] operator. | |
| const T & | operator[] (unsigned int i) const |
| const T & | operator() (uint32_t i) const |
| Array indexing using () operator. | |
| const T & | operator() (uint32_t x, uint32_t y) const |
| const T & | operator() (const Point2D< uint32_t > &p) const |
| T & | operator() (uint32_t i) |
| T & | operator() (uint32_t x, uint32_t y) |
| T & | operator() (const Point2D< uint32_t > &p) |
| const T * | data () const |
| T * | data () |
Private Member Functions | |
| uint32_t | checkIndex (uint32_t i) const |
| uint32_t | checkIndex (uint32_t x, uint32_t y) const |
Private Attributes | |
| std::vector< T > | m_data |
| Size2D< uint32_t > | m_size |
A template class to hold a 2-dimensional array of data.
Data in this array is tightly packed in a 1-dimensional vector in row-major order; that is, the vector index for any value given its 2-dimensional location (Point2D) is index = location.x() + (location.y() * size.x()); Indexing operators using iterators, 1-dimensional, or 2-dimensional coordinates are provided.
| typedef const T* Argus::Array2D< T >::const_iterator |
| typedef T* Argus::Array2D< T >::iterator |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlineprivate |
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
|
private |
1.8.1