Public Types | Public Member Functions | Protected Attributes
icl_core::Array2D< T, TAllocator > Class Template Reference

#include <Array2D.h>

List of all members.

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.
Array2Doperator= (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

Detailed Description

template<typename T, typename TAllocator = std::allocator<T>>
class icl_core::Array2D< T, TAllocator >

A simple 2D array using an STL vector container internally.

Template Parameters:
TCell data type.
TAllocatorOptional altervative allocator passed to the underlying std::vector.

Definition at line 38 of file Array2D.h.


Member Typedef Documentation

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::allocator_type icl_core::Array2D< T, TAllocator >::allocator_type

Definition at line 43 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::const_iterator icl_core::Array2D< T, TAllocator >::const_iterator

Definition at line 51 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::const_pointer icl_core::Array2D< T, TAllocator >::const_pointer

Definition at line 49 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::const_reference icl_core::Array2D< T, TAllocator >::const_reference

Definition at line 47 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::const_reverse_iterator icl_core::Array2D< T, TAllocator >::const_reverse_iterator

Definition at line 53 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef std::vector<T, TAllocator> icl_core::Array2D< T, TAllocator >::container_type

Definition at line 41 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::difference_type icl_core::Array2D< T, TAllocator >::difference_type

Definition at line 45 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::iterator icl_core::Array2D< T, TAllocator >::iterator

Definition at line 50 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::pointer icl_core::Array2D< T, TAllocator >::pointer

Definition at line 48 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::reference icl_core::Array2D< T, TAllocator >::reference

Definition at line 46 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::reverse_iterator icl_core::Array2D< T, TAllocator >::reverse_iterator

Definition at line 52 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::size_type icl_core::Array2D< T, TAllocator >::size_type

Definition at line 44 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
typedef container_type::value_type icl_core::Array2D< T, TAllocator >::value_type

Definition at line 42 of file Array2D.h.


Constructor & Destructor Documentation

template<typename T , typename TAllocator = std::allocator<T>>
icl_core::Array2D< T, TAllocator >::Array2D ( const allocator_type alloc = allocator_type()) [inline, explicit]

Definition at line 55 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
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]

Definition at line 61 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
icl_core::Array2D< T, TAllocator >::Array2D ( const Array2D< T, TAllocator > &  other) [inline]

Definition at line 69 of file Array2D.h.


Member Function Documentation

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::assign ( size_t  width,
size_t  height 
) [inline]

Definition at line 99 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::assign ( size_t  width,
size_t  height,
const value_type value 
) [inline]

Definition at line 106 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
const T& icl_core::Array2D< T, TAllocator >::at ( size_t  i) const [inline]

1D vector-like access.

Definition at line 124 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
T& icl_core::Array2D< T, TAllocator >::at ( size_t  i) [inline]

1D vector-like access.

Definition at line 126 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
const T& icl_core::Array2D< T, TAllocator >::at ( size_t  column,
size_t  row 
) const [inline]

2D access.

Definition at line 134 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
T& icl_core::Array2D< T, TAllocator >::at ( size_t  column,
size_t  row 
) [inline]

2D access.

Definition at line 136 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
iterator icl_core::Array2D< T, TAllocator >::begin ( ) [inline]

Definition at line 168 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
const_iterator icl_core::Array2D< T, TAllocator >::begin ( ) const [inline]

Definition at line 170 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_type icl_core::Array2D< T, TAllocator >::capacity ( ) const [inline]

Definition at line 165 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
bool icl_core::Array2D< T, TAllocator >::empty ( ) const [inline]

Definition at line 166 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
iterator icl_core::Array2D< T, TAllocator >::end ( ) [inline]

Definition at line 169 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
const_iterator icl_core::Array2D< T, TAllocator >::end ( ) const [inline]

Definition at line 171 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
allocator_type icl_core::Array2D< T, TAllocator >::get_allocator ( ) const [inline]

Definition at line 83 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_t icl_core::Array2D< T, TAllocator >::height ( ) const [inline]

Definition at line 162 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_t icl_core::Array2D< T, TAllocator >::index1D ( size_t  column,
size_t  row 
) const [inline]

Calculate the 1D index for 2D array coordinates.

Definition at line 144 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::indexTo2D ( size_t  i,
size_t &  column,
size_t &  row 
) const [inline]

Calculate the 2D array coordinates for a given 1D index.

Definition at line 147 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_type icl_core::Array2D< T, TAllocator >::max_size ( ) const [inline]

Definition at line 164 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
const T& icl_core::Array2D< T, TAllocator >::operator() ( size_t  column,
size_t  row 
) const [inline]

2D access.

Definition at line 139 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
T& icl_core::Array2D< T, TAllocator >::operator() ( size_t  column,
size_t  row 
) [inline]

2D access.

Definition at line 141 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
Array2D& icl_core::Array2D< T, TAllocator >::operator= ( const Array2D< T, TAllocator > &  other) [inline]

Definition at line 75 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
const T& icl_core::Array2D< T, TAllocator >::operator[] ( size_t  i) const [inline]

1D vector-like access.

Definition at line 129 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
T& icl_core::Array2D< T, TAllocator >::operator[] ( size_t  i) [inline]

1D vector-like access.

Definition at line 131 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::reset ( ) [inline]

Definition at line 113 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::resize ( size_t  width,
size_t  height 
) [inline]

Definition at line 85 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::resize ( size_t  width,
size_t  height,
const value_type value 
) [inline]

Definition at line 92 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::set ( const value_type value) [inline]

Definition at line 118 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_t icl_core::Array2D< T, TAllocator >::size ( ) const [inline]

Definition at line 163 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
void icl_core::Array2D< T, TAllocator >::swap ( Array2D< T, TAllocator > &  other) [inline]

Swap this array with another one.

Definition at line 154 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_t icl_core::Array2D< T, TAllocator >::width ( ) const [inline]

Definition at line 161 of file Array2D.h.


Member Data Documentation

template<typename T , typename TAllocator = std::allocator<T>>
std::vector<T> icl_core::Array2D< T, TAllocator >::m_container [protected]

Definition at line 174 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_t icl_core::Array2D< T, TAllocator >::m_height [protected]

Definition at line 176 of file Array2D.h.

template<typename T , typename TAllocator = std::allocator<T>>
size_t icl_core::Array2D< T, TAllocator >::m_width [protected]

Definition at line 175 of file Array2D.h.


The documentation for this class was generated from the following file:


fzi_icl_core
Author(s):
autogenerated on Thu Jun 6 2019 20:22:26