DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes
DGtal::DigitalSetInserter< TDigitalSet > Class Template Reference

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. More...

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

Inheritance diagram for DGtal::DigitalSetInserter< TDigitalSet >:

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

◆ DigitalSetInserter()

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

◆ BOOST_CONCEPT_ASSERT()

template<typename TDigitalSet >
DGtal::DigitalSetInserter< TDigitalSet >::BOOST_CONCEPT_ASSERT ( (concepts::CDigitalSet< TDigitalSet >)  )
private

◆ operator*()

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; }

◆ operator++() [1/2]

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; }

◆ operator++() [2/2]

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; }

◆ operator=()

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.

88 { mySet->insert(aPoint); return *this; }
const Point aPoint(3, 4)

References aPoint(), and DGtal::DigitalSetInserter< TDigitalSet >::mySet.

Field Documentation

◆ mySet

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: