$extrastylesheet
Olena
User documentation 2.1
An Image Processing Platform
Milena
Getting started
API Reference Manual
All Classes
Examples
Demos
Publications
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
centered_iter_adapter.hh
1
// Copyright (C) 2008, 2009, 2012 EPITA Research and Development
2
// Laboratory (LRDE)
3
//
4
// This file is part of Olena.
5
//
6
// Olena is free software: you can redistribute it and/or modify it under
7
// the terms of the GNU General Public License as published by the Free
8
// Software Foundation, version 2 of the License.
9
//
10
// Olena is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// General Public License for more details.
14
//
15
// You should have received a copy of the GNU General Public License
16
// along with Olena. If not, see <http://www.gnu.org/licenses/>.
17
//
18
// As a special exception, you may use this file as part of a free
19
// software project without restriction. Specifically, if other files
20
// instantiate templates or use macros or inline functions from this
21
// file, or you compile this file and link it with other files to produce
22
// an executable, this file does not by itself cause the resulting
23
// executable to be covered by the GNU General Public License. This
24
// exception does not however invalidate any other reasons why the
25
// executable file might be covered by the GNU General Public License.
26
27
#ifndef MLN_TOPO_CENTERED_ITER_ADAPTER_HH
28
# define MLN_TOPO_CENTERED_ITER_ADAPTER_HH
29
33
34
# include <mln/topo/internal/complex_relative_iterator_sequence.hh>
35
# include <mln/topo/center_only_iter.hh>
36
37
# include <mln/topo/face.hh>
38
39
40
namespace
mln
41
{
42
43
namespace
topo
44
{
45
46
/*----------------------------------------.
47
| topo::centered_fwd_iter_adapter<D, I>. |
48
`----------------------------------------*/
49
50
// FIXME: We should deduce D from I.
51
60
template
<
unsigned
D,
typename
I>
61
class
centered_fwd_iter_adapter
62
:
public
internal::complex_relative_iterator_sequence
< center_only_iter<D>,
63
I,
64
centered_fwd_iter_adapter<D, I> >
65
{
66
typedef
centered_fwd_iter_adapter<D, I>
self_
;
67
typedef
center_only_iter<D>
iter1_
;
68
typedef
I iter2_;
69
typedef
internal::complex_relative_iterator_sequence
<
iter1_
,
70
iter2_,
71
self_
>
super_
;
72
73
public
:
76
centered_fwd_iter_adapter
();
77
template
<
typename
Fref>
78
centered_fwd_iter_adapter
(
const
Fref& f_ref);
80
};
81
82
83
/*----------------------------------------.
84
| topo::centered_bkd_iter_adapter<D, I>. |
85
`----------------------------------------*/
86
87
// FIXME: We should deduce D from I.
88
97
template
<
unsigned
D,
typename
I>
98
class
centered_bkd_iter_adapter
99
:
public
internal::complex_relative_iterator_sequence
< I,
100
center_only_iter<D>,
101
centered_bkd_iter_adapter<D, I> >
102
{
103
typedef
centered_bkd_iter_adapter<D, I>
self_
;
104
typedef
I iter1_;
105
typedef
center_only_iter<D>
iter2_
;
106
typedef
internal::complex_relative_iterator_sequence
< iter1_,
107
iter2_
,
108
self_
>
super_
;
109
110
public
:
113
centered_bkd_iter_adapter
();
114
template
<
typename
Fref>
115
centered_bkd_iter_adapter
(
const
Fref& f_ref);
117
};
118
119
120
121
# ifndef MLN_INCLUDE_ONLY
122
123
/*----------------------------------------.
124
| topo::centered_fwd_iter_adapter<D, I>. |
125
`----------------------------------------*/
126
127
template
<
unsigned
D,
typename
I>
128
inline
129
centered_fwd_iter_adapter<D, I>::centered_fwd_iter_adapter
()
130
{
131
}
132
133
template
<
unsigned
D,
typename
I>
134
template
<
typename
Fref>
135
inline
136
centered_fwd_iter_adapter<D, I>::centered_fwd_iter_adapter
(
const
Fref& f_ref)
137
: super_(f_ref)
138
{
139
}
140
141
142
/*----------------------------------------.
143
| topo::centered_bkd_iter_adapter<D, I>. |
144
`----------------------------------------*/
145
146
template
<
unsigned
D,
typename
I>
147
inline
148
centered_bkd_iter_adapter<D, I>::centered_bkd_iter_adapter
()
149
{
150
}
151
152
template
<
unsigned
D,
typename
I>
153
template
<
typename
Fref>
154
inline
155
centered_bkd_iter_adapter<D, I>::centered_bkd_iter_adapter
(
const
Fref& f_ref)
156
: super_(f_ref)
157
{
158
}
159
160
# endif // ! MLN_INCLUDE_ONLY
161
162
}
// end of namespace mln::topo
163
164
}
// end of namespace mln
165
166
#endif // ! MLN_TOPO_CENTERED_ITER_ADAPTER_HH
mln
topo
centered_iter_adapter.hh
Copyright (C) 2012 EPITA Research and Development Laboratory (LRDE)