dune-grid 2.11
Loading...
Searching...
No Matches
Dune::EntityIterator< codim, Grid, IteratorImp > Class Template Reference

interface class for an iterator over grid entities More...

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

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

Public Types

typedef IteratorImp Implementation
 type of underlying implementation
typedef Grid::template Codim< codim >::Entity Entity
typedef std::conditional< std::is_lvalue_reference< decltype(realIterator.dereference())>::value, constEntity &, Entity >::type Reference
 Type of the reference used when dereferencing the Ptr.

Public Member Functions

Implementation & impl ()
 access to the underlying implementation
const Implementation & impl () const
 access to the underlying implementation
EntityIterator & operator++ ()
 prefix increment operator
EntityIterator operator++ (int)
 postfix increment operator
const Entity & operator* () const
 Dereferencing operator.
const Entity & operator-> () const
 Pointer operator.
bool operator== (const EntityIterator &rhs) const
 Checks for equality.
bool operator!= (const EntityIterator &rhs) const
 Checks for inequality.
Implementor's interface
 EntityIterator ()
 default construct (undefined) iterator
 EntityIterator (const IteratorImp &imp)
 copy constructor from implementation

Protected Attributes

IteratorImp realIterator

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.

Examples of entity iterators are:

  • iterators over the leaf level (LeafGridView::Iterator)
  • iterators over a grid level (LevelGridView::Iterator)
  • iterators over the children of an entity (Grid::HierarchicIterator)
Template Parameters
codimcodimension of entities this iterator walks over
Gridtype of the grid implementation
IteratorImptype of the iterator implementation

Member Typedef Documentation

◆ Entity

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

◆ Implementation

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

type of underlying implementation

Warning
Implementation details may change without prior notification.

◆ Reference

template<int codim, class Grid, class IteratorImp>
typedef std::conditional<std::is_lvalue_reference<decltype(realIterator.dereference())>::value,constEntity&,Entity>::type Dune::EntityIterator< codim, Grid, IteratorImp >::Reference

Type of the reference used when dereferencing the Ptr.

Constructor & Destructor Documentation

◆ EntityIterator() [1/2]

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

default construct (undefined) iterator

◆ EntityIterator() [2/2]

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

copy constructor from implementation

Member Function Documentation

◆ impl() [1/2]

template<int codim, class Grid, class IteratorImp>
Implementation & Dune::EntityIterator< codim, Grid, IteratorImp >::impl ( )
inline

access to the underlying implementation

Warning
Implementation details may change without prior notification.

◆ impl() [2/2]

template<int codim, class Grid, class IteratorImp>
const Implementation & Dune::EntityIterator< codim, Grid, IteratorImp >::impl ( ) const
inline

access to the underlying implementation

Warning
Implementation details may change without prior notification.

◆ operator!=()

template<int codim, class Grid, class IteratorImp>
bool Dune::EntityIterator< codim, Grid, IteratorImp >::operator!= ( const EntityIterator< codim, Grid, IteratorImp > & rhs) const
inline

Checks for inequality.

◆ operator*()

template<int codim, class Grid, class IteratorImp>
const Entity & Dune::EntityIterator< codim, Grid, IteratorImp >::operator* ( ) const

Dereferencing operator.

◆ operator++() [1/2]

template<int codim, class Grid, class IteratorImp>
EntityIterator & Dune::EntityIterator< codim, Grid, IteratorImp >::operator++ ( )
inline

prefix increment operator

◆ operator++() [2/2]

template<int codim, class Grid, class IteratorImp>
EntityIterator Dune::EntityIterator< codim, Grid, IteratorImp >::operator++ ( int )
inline

postfix increment operator

◆ operator->()

template<int codim, class Grid, class IteratorImp>
const Entity & Dune::EntityIterator< codim, Grid, IteratorImp >::operator-> ( ) const

Pointer operator.

◆ operator==()

template<int codim, class Grid, class IteratorImp>
bool Dune::EntityIterator< codim, Grid, IteratorImp >::operator== ( const EntityIterator< codim, Grid, IteratorImp > & rhs) const
inline

Checks for equality.

Member Data Documentation

◆ realIterator

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

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