TriaAccessor< structdim, dim > Class Template Reference
[Grid classesAccessor classes of the mesh iterators]

Inheritance diagram for TriaAccessor< structdim, dim >:

Inheritance graph
[legend]

List of all members.
static int level ()
int index () const
IteratorState::IteratorStates state () const
const Triangulation< dim > & get_triangulation () const

Public Types

typedef void * LocalData

Protected Types

typedef void AccessorData

Protected Member Functions

 TriaAccessor (const Triangulation< dim > *parent=0, const int level=-1, const int index=-1, const AccessorData *=0)
void copy_from (const TriaAccessor &)
void operator= (const TriaAccessor *)
TriaAccessoroperator= (const TriaAccessor &)
bool operator== (const TriaAccessor &) const
bool operator!= (const TriaAccessor &) const

Protected Attributes

int present_index
const Triangulation< dim > * tria

Static Private Attributes

static const unsigned int objectdim = dim

Friends

class TriaRawIterator
class TriaIterator
class TriaActiveIterator


Detailed Description

template<int structdim, int dim>
class TriaAccessor< structdim, dim >

A base class for the accessor classes used by TriaRawIterator and derived classes.

This class offers only the basic functionality required by the iterators (stores the necessary data members, offers comparison operators and the like), but has no functionality to actually dereference data. This is done in the derived classes.

This template is used for faces and edges, which have no level in the triangulation hierarchy associated with them. There exists a partial specialization of the current class template where structdim (the dimensionality of the object represented, for example 1 for a line) equals dim (the dimensionality of the space the object lives in, for example 3 if we solve three-dimensional problems).

Some internals of this class are discussed in Iterator and accessor internals .

Author:
Wolfgang Bangerth, 1998

Member Typedef Documentation

template<int structdim, int dim>
typedef void TriaAccessor< structdim, dim >::AccessorData [protected]

template<int structdim, int dim>
typedef void* TriaAccessor< structdim, dim >::LocalData

Data type to be used for passing parameters from iterators to the accessor classes in a unified way, no matter what the type of number of these parameters is.


Constructor & Destructor Documentation

template<int structdim, int dim>
TriaAccessor< structdim, dim >::TriaAccessor ( const Triangulation< dim > *  parent = 0,
const int  level = -1,
const int  index = -1,
const AccessorData = 0 
) [protected]

Constructor. Protected, thus only callable from friend classes.


Member Function Documentation

template<int structdim, int dim>
void TriaAccessor< structdim, dim >::copy_from ( const TriaAccessor< structdim, dim > &   )  [protected]

Copy operator. Since this is only called from iterators, do not return anything, since the iterator will return itself.

This method is protected, since it is only to be called from the iterator class.

template<int structdim, int dim>
void TriaAccessor< structdim, dim >::operator= ( const TriaAccessor< structdim, dim > *   )  [protected]

Copy operator. This is normally used in a context like iterator a,b; *a=*b;. Since the meaning is to copy the object pointed to by b to the object pointed to by a and since accessors are not real but virtual objects, this operation is not useful for iterators on triangulations. We declare this function here private, thus it may not be used from outside. Furthermore it is not implemented and will give a linker error if used anyway.

template<int structdim, int dim>
TriaAccessor& TriaAccessor< structdim, dim >::operator= ( const TriaAccessor< structdim, dim > &   )  [protected]

Same as above.

template<int structdim, int dim>
bool TriaAccessor< structdim, dim >::operator== ( const TriaAccessor< structdim, dim > &   )  const [protected]

Compare for equality.

template<int structdim, int dim>
bool TriaAccessor< structdim, dim >::operator!= ( const TriaAccessor< structdim, dim > &   )  const [protected]

Compare for inequality.

template<int structdim, int dim>
static int TriaAccessor< structdim, dim >::level (  )  [static]

@ name Iterator address and state Return the level the element pointed to belongs to. This is only valid for cells.

template<int structdim, int dim>
int TriaAccessor< structdim, dim >::index (  )  const

Return the index of the element presently pointed to on the present level.

template<int structdim, int dim>
IteratorState::IteratorStates TriaAccessor< structdim, dim >::state (  )  const

Return the state of the iterator. For the different states an accessor can be in, refer to the TriaRawIterator documentation.

template<int structdim, int dim>
const Triangulation<dim>& TriaAccessor< structdim, dim >::get_triangulation (  )  const

Return a pointer to the triangulation which the object pointed to by this class belongs to.


Friends And Related Function Documentation

template<int structdim, int dim>
friend class TriaRawIterator [friend]

template<int structdim, int dim>
friend class TriaIterator [friend]

template<int structdim, int dim>
friend class TriaActiveIterator [friend]


Member Data Documentation

template<int structdim, int dim>
int TriaAccessor< structdim, dim >::present_index [protected]

Used to store the index of the element presently pointed to on the level presentl used.

template<int structdim, int dim>
const Triangulation<dim>* TriaAccessor< structdim, dim >::tria [protected]

Pointer to the triangulation which we act on.

template<int structdim, int dim>
const unsigned int TriaAccessor< structdim, dim >::objectdim = dim [static, private]


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

deal.II documentation generated on Fri Nov 21 07:13:39 2008 by doxygen 1.5.6