dune-grid  2.1.1
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
Dune::EntityIterator< codim, Grid, IteratorImp > Class Template Reference

interface class for an iterator over grid entitiesAn entity iterator is an iterator over a subset of entities within a hierarchical grid. It is an extension of the Dune::EntityPointer interface. More...

#include <dune/grid/common/entityiterator.hh>

Inheritance diagram for Dune::EntityIterator< codim, Grid, IteratorImp >:
Inheritance graph

List of all members.

Public Types

typedef Grid::template Codim
< codim >::Entity 
Entity
 The Entity that this EntityPointer can point to.
enum  
 codimension of entity pointer More...
enum  
typedef IteratorImp ImplementationType
 type of real implementation

Public Member Functions

EntityIteratoroperator++ ()
 prefix increment operator
Implementor's interface
 EntityIterator (const IteratorImp &imp)
 copy constructor from implementaton
Constructor & conversion
 operator const EntityPointer< Grid, base > & () const
 Cast to EntityPointer with const base class of implementation as engine.
void compactify ()
Dereferencing
Entityoperator* () const
 Dereferencing operator.
Entityoperator-> () const
 Pointer operator.
Compare methods
bool operator== (const EntityPointer< Grid, ItImp > &rhs) const
 Checks for equality. Only works for EntityPointers and iterators on the same grid. Due to the conversion operators one can compare all kinds of iterators and EntityPointer.
bool operator!= (const EntityPointer< Grid, ItImp > &rhs) const
 Checks for inequality. Only works for EntityPointers and iterators on the same grid. Due to the conversion operators one can compare all kinds of iterators and EntityPointer.
Query methods
int level () const
 Ask for level of entity. This method is redundant and is only there for efficiency reasons. It allows an implementation to return the level without actually constructing the entity.
Implementor interface
bool equals (const EntityPointer< Grid, ItImp > &rhs) const
 Forward equality check to realIterator.

Protected Types

typedef
Dune::EnableIfInterOperable
< typename
IteratorImp::EntityPointerImp,
IteratorImp, typename
IteratorImp::EntityPointerImp >
::type 
base

Protected Member Functions

ImplementationTypegetRealImp ()
 return reference to the real implementation
const ImplementationTypegetRealImp () const
 return reference to the real implementation

Protected Attributes

IteratorImp realIterator

Friends

class Dune::GenericLeafIterator< GridImp >
class GridDefaultImplementation< GridImp::dimension, GridImp::dimensionworld, typename GridImp::ctype, typename GridImp::GridFamily >

Detailed Description

template<int codim, class Grid, class IteratorImp>
class Dune::EntityIterator< codim, Grid, IteratorImp >

interface class for an iterator over grid entities

An entity iterator is an iterator over a subset of entities within a hierarchical grid. It is an extension of the Dune::EntityPointer interface.

Examples of entity iterators are:

See also the documentation of Dune::EntityPointer.

Template Parameters:
codimcodimension of entities this iterator walks over
Gridtype of the grid implementation
IteratorImptype of the iterator implementation

Member Typedef Documentation

typedef Dune::EnableIfInterOperable<typename IteratorImp::EntityPointerImp,IteratorImp, typename IteratorImp::EntityPointerImp>::type Dune::EntityPointer< Grid , IteratorImp >::base [protected, inherited]
template<int codim, class Grid, class IteratorImp>
typedef Grid::template Codim< codim >::Entity Dune::EntityIterator< codim, Grid, IteratorImp >::Entity

The Entity that this EntityPointer can point to.

Reimplemented from Dune::EntityPointer< Grid, IteratorImp >.

typedef IteratorImp Dune::EntityPointer< Grid , IteratorImp >::ImplementationType [inherited]

type of real implementation


Member Enumeration Documentation

anonymous enum [inherited]

codimension of entity pointer

anonymous enum [inherited]

Constructor & Destructor Documentation

template<int codim, class Grid, class IteratorImp>
Dune::EntityIterator< codim, Grid, IteratorImp >::EntityIterator ( const IteratorImp &  imp) [inline]

copy constructor from implementaton


Member Function Documentation

void Dune::EntityPointer< Grid , IteratorImp >::compactify ( ) [inline, inherited]
Deprecated:
Reduce the entity pointers used memory to a minimum necessary to store all needed information.

Use EntitySeed to store entity information.

Deprecated:
bool Dune::EntityPointer< Grid , IteratorImp >::equals ( const EntityPointer< Grid , ItImp > &  rhs) const [inline, inherited]

Forward equality check to realIterator.

ImplementationType& Dune::EntityPointer< Grid , IteratorImp >::getRealImp ( ) [inline, protected, inherited]

return reference to the real implementation

const ImplementationType& Dune::EntityPointer< Grid , IteratorImp >::getRealImp ( ) const [inline, protected, inherited]

return reference to the real implementation

int Dune::EntityPointer< Grid , IteratorImp >::level ( ) const [inline, inherited]

Ask for level of entity. This method is redundant and is only there for efficiency reasons. It allows an implementation to return the level without actually constructing the entity.

Dune::EntityPointer< Grid , IteratorImp >::operator const EntityPointer< Grid , base > & ( ) const [inline, inherited]

Cast to EntityPointer with const base class of implementation as engine.

Note:
This cast is no longer needed to ensure assignability of iterators to EntityPointer.
Deprecated:
bool Dune::EntityPointer< Grid , IteratorImp >::operator!= ( const EntityPointer< Grid , ItImp > &  rhs) const [inline, inherited]

Checks for inequality. Only works for EntityPointers and iterators on the same grid. Due to the conversion operators one can compare all kinds of iterators and EntityPointer.

Entity& Dune::EntityPointer< Grid , IteratorImp >::operator* ( ) const [inline, inherited]

Dereferencing operator.

template<int codim, class Grid, class IteratorImp>
EntityIterator& Dune::EntityIterator< codim, Grid, IteratorImp >::operator++ ( ) [inline]
Entity* Dune::EntityPointer< Grid , IteratorImp >::operator-> ( ) const [inline, inherited]

Pointer operator.

bool Dune::EntityPointer< Grid , IteratorImp >::operator== ( const EntityPointer< Grid , ItImp > &  rhs) const [inline, inherited]

Checks for equality. Only works for EntityPointers and iterators on the same grid. Due to the conversion operators one can compare all kinds of iterators and EntityPointer.


Friends And Related Function Documentation

friend class Dune::GenericLeafIterator< Grid > [friend, inherited]
friend class GridDefaultImplementation< Grid ::dimension, Grid ::dimensionworld,typename Grid ::ctype,typename Grid ::GridFamily > [friend, inherited]

Member Data Documentation

IteratorImp Dune::EntityPointer< Grid , IteratorImp >::realIterator [protected, inherited]

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