dune-grid  2.3beta2
common/leveliterator.hh
Go to the documentation of this file.
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_LEVELITERATOR_HH
4 #define DUNE_GRID_LEVELITERATOR_HH
5 
6 #include <cstddef>
7 #include <iterator>
8 
11 
12 namespace Dune
13 {
14 
15  /**********************************************************************/
25  template<int codim, PartitionIteratorType pitype, class GridImp,
26  template<int,PartitionIteratorType,class> class LevelIteratorImp>
28  : public EntityIterator< codim, GridImp, LevelIteratorImp< codim, pitype, GridImp > >
29  {
31 
32  public:
39  {
40  ++static_cast< Base & >( *this );
41  return *this;
42  }
43 
44  };
45 
46 }
47 
48 namespace std {
49 
50  template
51  < int codim, Dune::PartitionIteratorType pitype, class GridImp,
52  template<int,Dune::PartitionIteratorType,class> class LevelIteratorImp>
53  struct iterator_traits<Dune::LevelIterator<codim, pitype, GridImp,
54  LevelIteratorImp> > {
55  typedef ptrdiff_t difference_type;
56  typedef const typename Dune::LevelIterator<codim, pitype, GridImp,
57  LevelIteratorImp>::Entity value_type;
58  typedef value_type* pointer;
60  typedef forward_iterator_tag iterator_category;
61  };
62 
63 } // namespace std
64 
65 #endif // DUNE_GRID_LEVELITERATOR_HH