dune-grid  2.2.1
entityiterator.hh
Go to the documentation of this file.
1 #ifndef DUNE_GRID_ENTITYITERATOR_HH
2 #define DUNE_GRID_ENTITYITERATOR_HH
3 
4 #include <cstddef>
5 #include <iterator>
6 
8 
9 namespace Dune
10 {
11 
32  template< int codim, class Grid, class IteratorImp >
34  : public EntityPointer< Grid, IteratorImp >
35  {
37 
38  protected:
39  using Base::realIterator;
40 
41  public:
42  typedef typename Grid::template Codim< codim >::Entity Entity;
43 
46  {
47  realIterator.increment();
48  return *this;
49  }
50 
56  EntityIterator ( const IteratorImp &imp )
57  : Base( imp )
58  {}
59 
61  };
62 
63 } // namespace Dune
64 
65 namespace std
66 {
67 
68  template< int codim, class Grid, class IteratorImp >
69  struct iterator_traits< Dune::EntityIterator< codim, Grid, IteratorImp > >
70  {
71  typedef ptrdiff_t difference_type;
73  typedef value_type *pointer;
75  typedef forward_iterator_tag iterator_category;
76  };
77 
78 } // namespace std
79 
80 #endif // #ifndef DUNE_GRID_ENTITYITERATOR_HH