deal.II version GIT relicensing-2430-g7f5db50250 2025-01-24 01:10:00+00:00
|
#include <deal.II/base/table.h>
Public Types | |
using | value_type = typename Types< N, T, C >::value_type |
using | iterator = typename Types< N, T, C >::iterator |
using | const_iterator = typename Types< N, T, C >::const_iterator |
using | reference = typename Types< N, T, C >::reference |
using | const_reference = typename Types< N, T, C >::const_reference |
using | size_type = size_t |
using | difference_type = ptrdiff_t |
using | TableType = typename Types< N, T, C >::TableType |
Public Member Functions | |
Accessor (const Accessor &a) | |
reference | operator[] (const size_type) const |
size_type | size () const |
iterator | begin () const |
iterator | end () const |
Private Member Functions | |
Accessor (const TableType &table, const iterator data) | |
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 > |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::value_type = typename Types<N, T, C>::value_type |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::iterator = typename Types<N, T, C>::iterator |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::const_iterator = typename Types<N, T, C>::const_iterator |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::reference = typename Types<N, T, C>::reference |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::const_reference = typename Types<N, T, C>::const_reference |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::size_type = size_t |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::difference_type = ptrdiff_t |
using internal::TableBaseAccessors::Accessor< N, T, C, 1 >::TableType = typename Types<N, T, C>::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 parent object, avoid problems with data consistency.
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 size_type | ) | const |
Index operator. Performs a range check.
size_type 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 iterator to the element past the end of this row.
|
friend |
|
private |
|
private |