Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends

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

List of all members.

Public Types

typedef Types< N, T, C >
::value_type 
value_type
typedef Types< N, T, C >::iterator iterator
typedef Types< N, T, C >
::const_iterator 
const_iterator
typedef Types< N, T, C >::reference reference
typedef Types< N, T, C >
::const_reference 
const_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 iterator data)
 Accessor ()

Private Attributes

const TableTypetable
const iterator data

Friends

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

Detailed Description

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

Definition at line 253 of file table.h.


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.

Definition at line 265 of file table.h.

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

Definition at line 267 of file table.h.

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

Definition at line 268 of file table.h.

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

Definition at line 270 of file table.h.

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

Definition at line 271 of file table.h.

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

Definition at line 273 of file table.h.

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

Definition at line 274 of file table.h.

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.

Definition at line 280 of file table.h.


Constructor & Destructor Documentation

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

Constructor. Take an iterator to the table object to know about the sizes of the various dimensions, and a iterator 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]

Definition at line 378 of file table.h.

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

Definition at line 380 of file table.h.

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

Definition at line 382 of file table.h.

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

Definition at line 383 of file table.h.


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.

Definition at line 370 of file table.h.

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

Definition at line 371 of file table.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

deal.II documentation generated on Fri Feb 3 2012 06:04:14 by doxygen 1.7.2