DGtal
0.6.devel
Main Page
Related Pages
Modules
Namespaces
Data Structures
Examples
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
src
DGtal
kernel
sets
DigitalSetInserter.h
1
17
#pragma once
18
31
#if defined(DigitalSetInserter_RECURSES)
32
#error Recursive header files inclusion detected in DigitalSetInserter.h
33
#else // defined(DigitalSetInserter_RECURSES)
34
35
#define DigitalSetInserter_RECURSES
36
37
#if !defined DigitalSetInserter_h
38
39
#define DigitalSetInserter_h
40
42
// Inclusions
43
#include "DGtal/base/Common.h"
44
#include "DGtal/kernel/sets/CDigitalSet.h"
45
46
#include <iostream>
47
49
50
namespace
DGtal
51
{
52
54
// template class DigitalSetInserter
64
template
<
typename
TDigitalSet>
65
class
DigitalSetInserter
:
66
public
std::iterator<std::output_iterator_tag,void,void,void,void>
67
{
68
69
BOOST_CONCEPT_ASSERT
((
CDigitalSet<TDigitalSet>
));
70
71
// ----------------------- Standard services ------------------------------
72
public
:
77
explicit
DigitalSetInserter
(TDigitalSet& aSet)
78
:
mySet
(&aSet) {}
79
80
// ----------------------- Interface --------------------------------------
81
public
:
82
87
DigitalSetInserter<TDigitalSet>
&
operator=
(
typename
TDigitalSet::Point aPoint)
88
{
mySet
->insert(aPoint);
return
*
this
; }
89
94
DigitalSetInserter<TDigitalSet>
&
operator*
()
95
{
return
*
this
; }
100
DigitalSetInserter<TDigitalSet>
&
operator++
()
101
{
return
*
this
; }
106
DigitalSetInserter<TDigitalSet>
operator++
(
int
)
107
{
return
*
this
; }
108
109
110
// ------------------------- Private Datas --------------------------------
111
private
:
115
TDigitalSet*
mySet
;
116
117
};
// end of class DigitalSetInserter
118
119
}
121
// Includes inline functions.
122
//#include "DGtal/images/DigitalSetInserter.ih"
123
124
//
126
127
#endif // !defined DigitalSetInserter_h
128
129
#undef DigitalSetInserter_RECURSES
130
#endif // else defined(DigitalSetInserter_RECURSES)
Generated on Wed Dec 19 2012 19:10:21 for DGtal by
1.8.1.1