internal::TableBaseAccessors::Accessor< N, T, C, 1 > Class Template Reference

List of all members.

Classes

class  ExcIndexRange

Public Types

typedef Types< N, T, C >
::value_type 
value_type
typedef value_typepointer
typedef const value_typeconst_pointer
typedef value_typeiterator
typedef const value_typeconst_iterator
typedef value_typereference
typedef const value_typeconst_reference
typedef size_t size_type
typedef ptrdiff_t difference_type
typedef Types< N, T, C >::TableType TableType

Public Member Functions

 Accessor (const Accessor &a)
reference operator[] (const unsigned int) const
unsigned int size () const
iterator begin () const
iterator end () const

Private Member Functions

 Accessor (const TableType &table, const pointer data)
 Accessor ()

Private Attributes

const TableTypetable
const pointer data

Friends

class ::Table
class Accessor
class ::Table< 2, T >
class Accessor< N, T, C, 2 >

template<int N, typename T, bool C>
class internal::TableBaseAccessors::Accessor< N, T, C, 1 >


Member Typedef Documentation

template<int N, typename T , bool C>
typedef Types<N,T,C>::value_type internal::TableBaseAccessors::Accessor< N, T, C, 1 >::value_type

Typedef constant and non-constant iterator types to the elements of this row, as well as all the other types usually required for the standard library algorithms.

template<int N, typename T , bool C>
typedef value_type* internal::TableBaseAccessors::Accessor< N, T, C, 1 >::pointer
template<int N, typename T , bool C>
typedef const value_type* internal::TableBaseAccessors::Accessor< N, T, C, 1 >::const_pointer
template<int N, typename T , bool C>
typedef value_type* internal::TableBaseAccessors::Accessor< N, T, C, 1 >::iterator
template<int N, typename T , bool C>
typedef const value_type* internal::TableBaseAccessors::Accessor< N, T, C, 1 >::const_iterator
template<int N, typename T , bool C>
typedef value_type& internal::TableBaseAccessors::Accessor< N, T, C, 1 >::reference
template<int N, typename T , bool C>
typedef const value_type& internal::TableBaseAccessors::Accessor< N, T, C, 1 >::const_reference
template<int N, typename T , bool C>
typedef size_t internal::TableBaseAccessors::Accessor< N, T, C, 1 >::size_type
template<int N, typename T , bool C>
typedef ptrdiff_t internal::TableBaseAccessors::Accessor< N, T, C, 1 >::difference_type
template<int N, typename T , bool C>
typedef Types<N,T,C>::TableType internal::TableBaseAccessors::Accessor< N, T, C, 1 >::TableType

Import a typedef from the switch class above.


Constructor & Destructor Documentation

template<int N, typename T , bool C>
internal::TableBaseAccessors::Accessor< N, T, C, 1 >::Accessor ( const TableType table,
const pointer  data 
) [private]

Constructor. Take a pointer to the table object to know about the sizes of the various dimensions, and a pointer to the subset of data we may access (which in this particular case is only one row).

The constructor is made private in order to prevent you having such objects around. The only way to create such objects is via the Table class, which only generates them as temporary objects. This guarantees that the accessor objects go out of scope earlier than the mother object, avoid problems with data consistency.

template<int N, typename T , bool C>
internal::TableBaseAccessors::Accessor< N, T, C, 1 >::Accessor (  )  [private]

Default constructor. Not needed, so private.

template<int N, typename T , bool C>
internal::TableBaseAccessors::Accessor< N, T, C, 1 >::Accessor ( const Accessor< N, T, C, 1 > &  a  ) 

Copy constructor. This constructor is public so that one can pass sub-tables to functions as arguments, as in f(table[i]).

Using this constructor is risky if accessors are stored longer than the table it points to. Don't do this.


Member Function Documentation

template<int N, typename T , bool C>
reference internal::TableBaseAccessors::Accessor< N, T, C, 1 >::operator[] ( const unsigned  int  )  const

Index operator. Performs a range check.

template<int N, typename T , bool C>
unsigned int internal::TableBaseAccessors::Accessor< N, T, C, 1 >::size (  )  const

Return the length of one row, i.e. the number of elements corresponding to the last index of the table object.

template<int N, typename T , bool C>
iterator internal::TableBaseAccessors::Accessor< N, T, C, 1 >::begin (  )  const

Return an iterator to the first element of this row.

template<int N, typename T , bool C>
iterator internal::TableBaseAccessors::Accessor< N, T, C, 1 >::end (  )  const

Return an interator to the element past the end of this row.


Friends And Related Function Documentation

template<int N, typename T , bool C>
friend class ::Table [friend]
template<int N, typename T , bool C>
friend class Accessor [friend]
template<int N, typename T , bool C>
friend class ::Table< 2, T > [friend]
template<int N, typename T , bool C>
friend class Accessor< N, T, C, 2 > [friend]

Member Data Documentation

template<int N, typename T , bool C>
const TableType& internal::TableBaseAccessors::Accessor< N, T, C, 1 >::table [private]

Store the data given to the constructor. There are no non-const member functions of this class, so there is no reason not to make these elements constant.

template<int N, typename T , bool C>
const pointer internal::TableBaseAccessors::Accessor< N, T, C, 1 >::data [private]

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

deal.II documentation generated on Mon Nov 23 22:58:24 2009 by doxygen 1.6.1