DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
IteratorFunctions.h
1
16
17
#pragma once
18
30
31
#if defined(IteratorFunctions_RECURSES)
32
#error Recursive header files inclusion detected in IteratorFunctions.h
33
#else
// defined(IteratorFunctions_RECURSES)
35
#define IteratorFunctions_RECURSES
36
37
#if !defined IteratorFunctions_h
39
#define IteratorFunctions_h
40
42
// Inclusions
43
#include<iterator>
44
#include "DGtal/base/IteratorCirculatorTraits.h"
46
47
namespace
DGtal
48
{
49
51
// template functions isNotEmpty
52
53
namespace
detail
54
{
55
63
template
<
typename
IC >
64
inline
65
bool
isNotEmpty
(
const
IC& itb,
const
IC& ite,
IteratorType
);
66
74
template
<
typename
IC >
75
inline
76
bool
isNotEmpty
(
const
IC& c1,
const
IC& c2,
CirculatorType
);
77
78
}
//end namespace detail
79
86
template
<
typename
IC>
87
inline
88
bool
isEmpty
(
const
IC& itb,
const
IC& ite );
89
96
template
<
typename
IC>
97
inline
98
bool
isNotEmpty
(
const
IC& itb,
const
IC& ite );
99
101
// template functions for the size and middle of a (sub)range
102
109
template
<
typename
IC>
110
inline
111
void
advanceIterator
(IC& ic,
112
typename
IteratorCirculatorTraits<IC>::Difference
n);
113
114
namespace
detail
115
{
122
template
<
typename
IC>
123
inline
124
void
advanceIterator
(IC& ic,
125
typename
IteratorCirculatorTraits<IC>::Difference
n,
126
ForwardCategory
/*c*/
);
127
134
template
<
typename
IC>
135
inline
136
void
advanceIterator
(IC& ic,
137
typename
IteratorCirculatorTraits<IC>::Difference
n,
138
RandomAccessCategory
/*c*/
);
139
}
//end namespace detail
140
148
template
<
typename
IC>
149
inline
150
typename
IteratorCirculatorTraits<IC>::Difference
151
rangeSize
(
const
IC& itb,
const
IC& ite);
152
162
template
<
typename
IC>
163
inline
164
typename
IteratorCirculatorTraits<IC>::Difference
165
subRangeSize
(
const
IC& itb,
const
IC& ite);
166
167
namespace
detail
168
{
177
template
<
typename
I>
178
inline
179
typename
IteratorCirculatorTraits<I>::Difference
180
rangeSize
(
const
I& itb,
const
I& ite,
IteratorType
/*t*/
,
ForwardCategory
/*c*/
);
181
191
template
<
typename
C>
192
inline
193
typename
IteratorCirculatorTraits<C>::Difference
194
rangeSize
(
const
C& cb,
const
C& ce,
CirculatorType
/*t*/
,
ForwardCategory
/*c*/
);
195
204
template
<
typename
I>
205
inline
206
typename
IteratorCirculatorTraits<I>::Difference
207
rangeSize
(
const
I& itb,
const
I& ite,
IteratorType
/*t*/
,
RandomAccessCategory
/*c*/
);
208
218
template
<
typename
C>
219
inline
220
typename
IteratorCirculatorTraits<C>::Difference
221
rangeSize
(
const
C& cb,
const
C& ce,
CirculatorType
/*t*/
,
RandomAccessCategory
/*c*/
);
222
223
}
//namespace detail
224
237
template
<
typename
IC>
238
inline
239
IC
rangeMiddle
(
const
IC& itb,
const
IC& ite);
240
249
template
<
typename
IC>
250
inline
251
IC
subRangeMiddle
(
const
IC& itb,
const
IC& ite);
252
253
namespace
detail
254
{
263
template
<
typename
I>
264
inline
265
I
rangeMiddle
(
const
I& itb,
const
I& ite,
IteratorType
/*t*/
,
ForwardCategory
/*c*/
);
266
276
template
<
typename
C>
277
inline
278
C
rangeMiddle
(
const
C& cb,
const
C& ce,
CirculatorType
/*t*/
,
ForwardCategory
/*c*/
);
279
288
template
<
typename
I>
289
inline
290
I
rangeMiddle
(
const
I& itb,
const
I& ite,
IteratorType
/*t*/
,
BidirectionalCategory
/*c*/
);
291
301
template
<
typename
C>
302
inline
303
C
rangeMiddle
(
const
C& cb,
const
C& ce,
CirculatorType
/*t*/
,
BidirectionalCategory
/*c*/
);
304
313
template
<
typename
I>
314
inline
315
I
rangeMiddle
(
const
I& itb,
const
I& ite,
IteratorType
/*t*/
,
RandomAccessCategory
/*c*/
);
316
326
template
<
typename
C>
327
inline
328
C
rangeMiddle
(
const
C& cb,
const
C& ce,
CirculatorType
/*t*/
,
RandomAccessCategory
/*c*/
);
329
}
// namespace namespace
330
331
332
}
// namespace DGtal
333
334
335
336
338
// Includes inline functions.
339
#include "DGtal/base/IteratorFunctions.ih"
340
341
// //
343
344
#endif
// !defined IteratorFunctions_h
345
346
#undef IteratorFunctions_RECURSES
347
#endif
// else defined(IteratorFunctions_RECURSES)
DGtal::detail
detail namespace gathers internal classes and functions.
Definition
ContainerTraits.h:210
DGtal::detail::advanceIterator
void advanceIterator(IC &ic, typename IteratorCirculatorTraits< IC >::Difference n, ForwardCategory)
DGtal::detail::rangeSize
IteratorCirculatorTraits< I >::Difference rangeSize(const I &itb, const I &ite, IteratorType, ForwardCategory)
DGtal::detail::isNotEmpty
bool isNotEmpty(const IC &itb, const IC &ite, IteratorType)
DGtal::detail::rangeMiddle
I rangeMiddle(const I &itb, const I &ite, IteratorType, ForwardCategory)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::rangeSize
IteratorCirculatorTraits< IC >::Difference rangeSize(const IC &itb, const IC &ite)
DGtal::subRangeMiddle
IC subRangeMiddle(const IC &itb, const IC &ite)
DGtal::isEmpty
bool isEmpty(const IC &itb, const IC &ite)
DGtal::isNotEmpty
bool isNotEmpty(const IC &itb, const IC &ite)
DGtal::rangeMiddle
IC rangeMiddle(const IC &itb, const IC &ite)
DGtal::advanceIterator
void advanceIterator(IC &ic, typename IteratorCirculatorTraits< IC >::Difference n)
DGtal::subRangeSize
IteratorCirculatorTraits< IC >::Difference subRangeSize(const IC &itb, const IC &ite)
DGtal::BidirectionalCategory
Definition
IteratorCirculatorTraits.h:58
DGtal::CirculatorType
Definition
IteratorCirculatorTraits.h:52
DGtal::ForwardCategory
Definition
IteratorCirculatorTraits.h:57
DGtal::IteratorCirculatorTraits::Difference
IC::difference_type Difference
Definition
IteratorCirculatorTraits.h:304
DGtal::IteratorType
Definition
IteratorCirculatorTraits.h:51
DGtal::RandomAccessCategory
Definition
IteratorCirculatorTraits.h:59
src
DGtal
base
IteratorFunctions.h
Generated on
for DGtal by
1.18.0