dune-grid
2.2.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
grid
common
common/intersectioniterator.hh
Go to the documentation of this file.
1
#ifndef DUNE_GRID_INTERSECTIONITERATOR_HH
2
#define DUNE_GRID_INTERSECTIONITERATOR_HH
3
4
#include <dune/common/iteratorfacades.hh>
5
6
#include <
dune/grid/common/intersection.hh
>
7
8
namespace
Dune
9
{
10
87
template
<
class
Gr
id
Imp,
template
<
class
>
class
IntersectionIteratorImp,
template
<
class
>
class
IntersectionImp>
88
class
IntersectionIterator
89
{
90
#if DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS
91
public
:
92
#else
93
protected
:
94
// give the GridDefaultImplementation class access to the realImp
95
friend
class
GridDefaultImplementation
<
96
GridImp::dimension, GridImp::dimensionworld,
97
typename GridImp::ctype,
98
typename GridImp::GridFamily> ;
99
#endif
100
// type of underlying implementation, for internal use only
101
typedef IntersectionIteratorImp< const GridImp >
Implementation
;
102
104
Implementation
&
impl
() {
return
realIterator
; }
106
const
Implementation
&
impl
()
const
{
return
realIterator
; }
107
108
protected
:
109
Implementation
realIterator
;
110
111
public
:
113
typedef
Dune::Intersection< const GridImp, IntersectionImp >
Intersection
;
114
115
//===========================================================
119
//===========================================================
120
122
const
Intersection
&
operator*
()
const
123
{
124
return
this->
realIterator
.dereference();
125
}
126
128
const
Intersection
*
operator->
()
const
129
{
130
return
& this->
realIterator
.dereference();
131
}
133
134
135
//===========================================================
139
//===========================================================
140
146
bool
operator==
(
const
IntersectionIterator
& rhs)
const
147
{
148
return
rhs.
equals
(*
this
);
149
}
150
156
bool
operator!=
(
const
IntersectionIterator
& rhs)
const
157
{
158
return
! rhs.
equals
(*
this
);
159
}
161
163
IntersectionIterator
&
operator++
()
164
{
165
this->
realIterator
.increment();
166
return
*
this
;
167
}
168
169
//===========================================================
173
//===========================================================
174
176
bool
equals
(
const
IntersectionIterator
& rhs)
const
177
{
178
return
this->
realIterator
.equals(rhs.
realIterator
);
179
}
180
182
IntersectionIterator
(
const
IntersectionIteratorImp<const GridImp> & i) :
183
realIterator
(i) {}
184
186
IntersectionIterator
(
const
IntersectionIterator
& i) :
187
realIterator
(i.
realIterator
) {}
189
190
typedef
typename
remove_const<GridImp>::type
mutableGridImp
;
191
};
192
193
}
// namespace Dune
194
195
#include "intersection.hh"
196
197
#endif // DUNE_GRID_INTERSECTIONITERATOR_HH
Generated on Tue Feb 26 2013 17:21:30 for dune-grid by
1.8.1.2