DGtal  0.9.4beta
Public Member Functions | Private Member Functions | Private Attributes
DGtal::DigitalSetInserter< TDigitalSet > Class Template Reference

#include <DGtal/kernel/sets/DigitalSetInserter.h>

Inheritance diagram for DGtal::DigitalSetInserter< TDigitalSet >:
[legend]
Collaboration diagram for DGtal::DigitalSetInserter< TDigitalSet >:
[legend]

Public Member Functions

 DigitalSetInserter (TDigitalSet &aSet)
 
DigitalSetInserter< TDigitalSet > & operator= (typename TDigitalSet::Point aPoint)
 
DigitalSetInserter< TDigitalSet > & operator* ()
 
DigitalSetInserter< TDigitalSet > & operator++ ()
 
DigitalSetInserter< TDigitalSet > operator++ (int)
 

Private Member Functions

 BOOST_CONCEPT_ASSERT ((concepts::CDigitalSet< TDigitalSet >))
 

Private Attributes

TDigitalSet * mySet
 

Detailed Description

template<typename TDigitalSet>
class DGtal::DigitalSetInserter< TDigitalSet >

Aim: this output iterator class is designed to allow algorithms to insert points in the digital set. Using the assignment operator, even when dereferenced, causes the digital set to insert a point.

Description of template class 'DigitalSetInserter'

Template Parameters
TDigitalSetany model of CDigitalSet
Examples:
geometry/curves/exampleGridCurve3d-2.cpp.

Definition at line 65 of file DigitalSetInserter.h.

Constructor & Destructor Documentation

template<typename TDigitalSet>
DGtal::DigitalSetInserter< TDigitalSet >::DigitalSetInserter ( TDigitalSet &  aSet)
inlineexplicit

Constructor.

Parameters
aSetany digital set

Definition at line 77 of file DigitalSetInserter.h.

78  : mySet(&aSet) {}

Member Function Documentation

template<typename TDigitalSet>
DGtal::DigitalSetInserter< TDigitalSet >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSet< TDigitalSet >)  )
private
template<typename TDigitalSet>
DigitalSetInserter<TDigitalSet>& DGtal::DigitalSetInserter< TDigitalSet >::operator* ( )
inline

Dereference operator

Returns
a reference to *this

Definition at line 94 of file DigitalSetInserter.h.

95  { return *this; }
template<typename TDigitalSet>
DigitalSetInserter<TDigitalSet>& DGtal::DigitalSetInserter< TDigitalSet >::operator++ ( )
inline

Pre-increment operator

Returns
a reference to *this

Definition at line 100 of file DigitalSetInserter.h.

101  { return *this; }
template<typename TDigitalSet>
DigitalSetInserter<TDigitalSet> DGtal::DigitalSetInserter< TDigitalSet >::operator++ ( int  )
inline

Post-increment operator

Returns
*this

Definition at line 106 of file DigitalSetInserter.h.

107  { return *this; }
template<typename TDigitalSet>
DigitalSetInserter<TDigitalSet>& DGtal::DigitalSetInserter< TDigitalSet >::operator= ( typename TDigitalSet::Point  aPoint)
inline

Assignment operator.

Parameters
aPointthe point to insert

Definition at line 87 of file DigitalSetInserter.h.

References DGtal::DigitalSetInserter< TDigitalSet >::mySet.

88  { mySet->insert(aPoint); return *this; }

Field Documentation

template<typename TDigitalSet>
TDigitalSet* DGtal::DigitalSetInserter< TDigitalSet >::mySet
private

Aliasing pointer on the underlying set

Definition at line 115 of file DigitalSetInserter.h.

Referenced by DGtal::DigitalSetInserter< TDigitalSet >::operator=().


The documentation for this class was generated from the following file: