Dune::array< T, N > Class Template Reference
[Common (foundation classes)]

Simple fixed size array class. This replaces std::array, if that is not available. More...

#include <dune/common/array.hh>

List of all members.

Public Types

typedef T value_type
 Remember the storage type.
typedef value_typereference
 Reference to an object.
typedef const value_typeconst_reference
 Const reference to an object.
typedef value_typeiterator
 Iterator type.
typedef const value_typeconst_iterator
 Const iterator type.
typedef std::size_t size_type
 Type used for array indices.
typedef std::ptrdiff_t difference_type
 Difference type.
typedef std::reverse_iterator
< iterator
reverse_iterator
 Reverse iterator type.
typedef std::reverse_iterator
< const_iterator
const_reverse_iterator
 Const reverse iterator type.

Public Member Functions

 array ()
 Create uninitialized array.
size_type size () const
 Return array size.
array< T, N > & operator= (const T &t)
 Assign value to all entries.
void assign (const T &t)
 Assign value to all entries.
reference operator[] (size_type i)
 Component access.
const_reference operator[] (size_type i) const
 Const component access.
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const

Protected Attributes

a [(N > 0)?N:1]

Detailed Description

template<class T, int N>
class Dune::array< T, N >

Simple fixed size array class. This replaces std::array, if that is not available.


Member Typedef Documentation

template<class T, int N>
typedef const value_type* Dune::array< T, N >::const_iterator

Const iterator type.

template<class T, int N>
typedef const value_type& Dune::array< T, N >::const_reference

Const reference to an object.

template<class T, int N>
typedef std::reverse_iterator<const_iterator> Dune::array< T, N >::const_reverse_iterator

Const reverse iterator type.

template<class T, int N>
typedef std::ptrdiff_t Dune::array< T, N >::difference_type

Difference type.

template<class T, int N>
typedef value_type* Dune::array< T, N >::iterator

Iterator type.

template<class T, int N>
typedef value_type& Dune::array< T, N >::reference

Reference to an object.

template<class T, int N>
typedef std::reverse_iterator<iterator> Dune::array< T, N >::reverse_iterator

Reverse iterator type.

template<class T, int N>
typedef std::size_t Dune::array< T, N >::size_type

Type used for array indices.

template<class T, int N>
typedef T Dune::array< T, N >::value_type

Remember the storage type.


Constructor & Destructor Documentation

template<class T, int N>
Dune::array< T, N >::array (  )  [inline]

Create uninitialized array.


Member Function Documentation

template<class T, int N>
void Dune::array< T, N >::assign ( const T &  t  )  [inline]

Assign value to all entries.

References Dune::array< T, N >::a.

template<class T, int N>
const_iterator Dune::array< T, N >::begin (  )  const [inline]
template<class T, int N>
iterator Dune::array< T, N >::begin (  )  [inline]
template<class T, int N>
const_iterator Dune::array< T, N >::end (  )  const [inline]
template<class T, int N>
iterator Dune::array< T, N >::end (  )  [inline]
template<class T, int N>
array<T,N>& Dune::array< T, N >::operator= ( const T &  t  )  [inline]

Assign value to all entries.

References Dune::array< T, N >::a.

template<class T, int N>
const_reference Dune::array< T, N >::operator[] ( size_type  i  )  const [inline]

Const component access.

References Dune::array< T, N >::a.

template<class T, int N>
reference Dune::array< T, N >::operator[] ( size_type  i  )  [inline]

Component access.

References Dune::array< T, N >::a.

template<class T, int N>
size_type Dune::array< T, N >::size (  )  const [inline]

Return array size.


Member Data Documentation

template<class T, int N>
T Dune::array< T, N >::a[(N > 0)?N:1] [protected]

The documentation for this class was generated from the following file:
Generated on Mon Apr 26 10:45:23 2010 for dune-common by  doxygen 1.6.3