dune-grid  2.2.1
common/leafiterator.hh
Go to the documentation of this file.
1 #ifndef DUNE_GRID_LEAFITERATOR_HH
2 #define DUNE_GRID_LEAFITERATOR_HH
3 
4 #include <cstddef>
5 #include <iterator>
6 
9 
10 namespace Dune
11 {
12 
13 /**********************************************************************/
24 template<int codim, PartitionIteratorType pitype, class GridImp,
25  template<int,PartitionIteratorType,class> class LeafIteratorImp>
27 : public EntityIterator< codim, GridImp, LeafIteratorImp< codim, pitype, GridImp > >
28 {
30 
31 public:
34  {
35  ++static_cast< Base & >( *this );
36  this->realIterator.increment();
37  return *this;
38  }
39 
40  //===========================================================
44  //===========================================================
45 
47  LeafIterator (const LeafIteratorImp<codim, pitype, const GridImp> & i) DUNE_DEPRECATED
48  : Base( i )
49  {}
51 };
52 
53 }
54 
55 namespace std {
56 
57  template
58  < int codim, Dune::PartitionIteratorType pitype, class GridImp,
59  template<int,Dune::PartitionIteratorType,class> class LeafIteratorImp>
60  struct iterator_traits<Dune::LeafIterator<codim, pitype, GridImp,
61  LeafIteratorImp> > {
62  typedef ptrdiff_t difference_type;
63  typedef const typename Dune::LeafIterator<codim, pitype, GridImp,
64  LeafIteratorImp>::Entity value_type;
65  typedef value_type* pointer;
67  typedef forward_iterator_tag iterator_category;
68  };
69 
70 } // namespace std
71 
72 #endif // DUNE_GRID_LEAFITERATOR_HH