DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator Class Reference

#include <DGtal/base/LabelledMap.h>

Public Types

typedef ConstIterator Self
 
typedef const ValuePointer
 
typedef Value Reference
 Note the trick here. The reference is a rvalue. Works only for const iterator.
 
typedef std::ptrdiff_t DifferenceType
 
typedef Value value_type
 
typedef std::size_t size_type
 
typedef DifferenceType difference_type
 
typedef Pointer pointer
 
typedef Reference reference
 
typedef std::forward_iterator_tag iterator_category
 

Public Member Functions

 ~ConstIterator ()
 
 ConstIterator ()
 
 ConstIterator (const ConstIterator &other)
 
Selfoperator= (const Self &other)
 
Reference operator* () const
 
Pointer operator-> () const
 
Selfoperator++ ()
 
Self operator++ (int)
 
bool operator== (const Self &other) const
 
bool operator!= (const Self &other) const
 
Data_data () const
 
const Data_const_data () const
 

Protected Member Functions

 ConstIterator (LabelsConstIterator lIt, BlockConstIterator bIt)
 

Private Attributes

LabelsConstIterator myLabelsIt
 ConstIterator to visit keys.
 
BlockConstIterator myBlockIt
 ConstIterator to visit datas.
 

Friends

class LabelledMap
 

Detailed Description

template<typename TData, unsigned int L, typename TWord, unsigned int N, unsigned int M>
class DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator

This class allows to visit all stored pairs (key,value).

Definition at line 629 of file LabelledMap.h.

Member Typedef Documentation

◆ difference_type

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef DifferenceType DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::difference_type

Definition at line 643 of file LabelledMap.h.

◆ DifferenceType

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef std::ptrdiff_t DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::DifferenceType

Definition at line 638 of file LabelledMap.h.

◆ iterator_category

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef std::forward_iterator_tag DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::iterator_category

Definition at line 647 of file LabelledMap.h.

◆ Pointer

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef const Value* DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::Pointer

Definition at line 635 of file LabelledMap.h.

◆ pointer

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef Pointer DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::pointer

Definition at line 644 of file LabelledMap.h.

◆ Reference

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef Value DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::Reference

Note the trick here. The reference is a rvalue. Works only for const iterator.

Definition at line 637 of file LabelledMap.h.

◆ reference

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef Reference DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::reference

Definition at line 645 of file LabelledMap.h.

◆ Self

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef ConstIterator DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::Self

Definition at line 632 of file LabelledMap.h.

◆ size_type

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef std::size_t DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::size_type

Definition at line 642 of file LabelledMap.h.

◆ value_type

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
typedef Value DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::value_type

Definition at line 641 of file LabelledMap.h.

Constructor & Destructor Documentation

◆ ConstIterator() [1/3]

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::ConstIterator ( LabelsConstIterator lIt,
BlockConstIterator bIt )
protected

Constructor. Internal. Used by LabelledMap.

◆ ~ConstIterator()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::~ConstIterator ( )

Default destructor.

◆ ConstIterator() [2/3]

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::ConstIterator ( )

Default constructor.

◆ ConstIterator() [3/3]

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::ConstIterator ( const ConstIterator & other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

◆ _const_data()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
const Data & DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::_const_data ( ) const

◆ _data()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
Data & DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::_data ( ) const

◆ operator!=()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
bool DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::operator!= ( const Self & other) const

Inequality operator.

Parameters
otherany other iterator.
Returns
'true' iff the iterators points on different elements.

◆ operator*()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
Reference DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::operator* ( ) const

Dereference operator.

Returns
the current data of the iterator, if valid.

◆ operator++() [1/2]

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
Self & DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::operator++ ( )

Pre-increment operator.

Returns
a reference to itself.

◆ operator++() [2/2]

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
Self DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::operator++ ( int )

Post-increment operator.

Returns
a reference to itself.

◆ operator->()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
Pointer DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::operator-> ( ) const

Pointer dereference operator. Warning: Not thread-safe !! Use operator* instead.

Returns
a non-mutable pointer on the current data.

◆ operator=()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
Self & DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::operator= ( const Self & other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.

◆ operator==()

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
bool DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::operator== ( const Self & other) const

Equality operator.

Parameters
otherany other iterator.
Returns
'true' iff the iterators points on the same element.

Friends And Related Symbol Documentation

◆ LabelledMap

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
friend class LabelledMap
friend

Definition at line 631 of file LabelledMap.h.

Field Documentation

◆ myBlockIt

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
BlockConstIterator DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::myBlockIt
private

ConstIterator to visit datas.

Definition at line 653 of file LabelledMap.h.

◆ myLabelsIt

template<typename TData , unsigned int L, typename TWord , unsigned int N, unsigned int M>
LabelsConstIterator DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator::myLabelsIt
private

ConstIterator to visit keys.

Definition at line 651 of file LabelledMap.h.


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