![]() |
Reference documentation for deal.II version 8.1.0
|
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 TableType & | table |
const iterator | data |
Friends | |
template<int N1, typename T1 > | |
class | ::Table |
template<int N1, typename T1 , bool C1, unsigned int P1> | |
class | Accessor |
class | ::Table< 2, T > |
class | Accessor< N, T, C, 2 > |
typedef Types<N,T,C>::value_type internal::TableBaseAccessors::Accessor< N, T, C, 1 >::value_type |
typedef Types<N,T,C>::TableType internal::TableBaseAccessors::Accessor< N, T, C, 1 >::TableType |
|
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.
|
private |
Default constructor. Not needed, so private.
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.
reference internal::TableBaseAccessors::Accessor< N, T, C, 1 >::operator[] | ( | const unsigned | int | ) | const |
Index operator. Performs a range check.
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.
iterator internal::TableBaseAccessors::Accessor< N, T, C, 1 >::begin | ( | ) | const |
Return an iterator to the first element of this row.
iterator internal::TableBaseAccessors::Accessor< N, T, C, 1 >::end | ( | ) | const |
Return an interator to the element past the end of this row.
|
private |