dune-grid
2.3beta2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
grid
common
entityiterator.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_ENTITYITERATOR_HH
4
#define DUNE_GRID_ENTITYITERATOR_HH
5
6
#include <cstddef>
7
#include <iterator>
8
9
#include <
dune/grid/common/entitypointer.hh
>
10
11
namespace
Dune
12
{
13
34
template
<
int
codim,
class
Gr
id
,
class
IteratorImp >
35
class
EntityIterator
36
:
public
EntityPointer
< Grid, IteratorImp >
37
{
38
typedef
EntityPointer< Grid, IteratorImp >
Base
;
39
40
protected
:
41
using
Base::realIterator
;
42
43
public
:
44
typedef
typename
Grid::template Codim< codim >::Entity
Entity
;
45
47
EntityIterator
&
operator++
()
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
67
namespace
std
68
{
69
70
template
<
int
codim,
class
Gr
id
,
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
Generated on Mon Feb 10 2014 21:12:29 for dune-grid by
1.8.1.2