Dune Core Modules (2.3.1)

entityiterator.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3#ifndef DUNE_GRID_ENTITYITERATOR_HH
4#define DUNE_GRID_ENTITYITERATOR_HH
5
6#include <cstddef>
7#include <iterator>
8
10
11namespace Dune
12{
13
34 template< int codim, class Grid, class IteratorImp >
36 : public EntityPointer< Grid, IteratorImp >
37 {
39
40 protected:
41 using Base::realIterator;
42
43 public:
44 typedef typename Grid::template Codim< codim >::Entity Entity;
45
48 {
49 realIterator.increment();
50 return *this;
51 }
52
58 EntityIterator ( const IteratorImp &imp )
59 : Base( imp )
60 {}
61
63 };
64
65} // namespace Dune
66
67namespace std
68{
69
70 template< int codim, class Grid, class IteratorImp >
71 struct iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
72 {
73 typedef ptrdiff_t difference_type;
74 typedef const typename Dune::EntityIterator< codim, Grid, IteratorImp >::Entity value_type;
75 typedef value_type *pointer;
76 typedef value_type &reference;
77 typedef forward_iterator_tag iterator_category;
78 };
79
80} // namespace std
81
82#endif // #ifndef DUNE_GRID_ENTITYITERATOR_HH
interface class for an iterator over grid entities
Definition: entityiterator.hh:37
EntityIterator(const IteratorImp &imp)
copy constructor from implementaton
Definition: entityiterator.hh:58
EntityIterator & operator++()
prefix increment operator
Definition: entityiterator.hh:47
Wrapper class for pointers to entities.
Definition: entitypointer.hh:92
Wrapper and interface classe for a static iterator (EntityPointer)
Dune namespace.
Definition: alignment.hh:14
STL namespace.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)