DGtal  0.9.3beta
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | Friends
DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator Class Reference

#include <DGtal/base/LabelledMap.h>

Collaboration diagram for DGtal::LabelledMap< TData, L, TWord, N, M >::ConstIterator:
[legend]

Public Types

typedef ConstIterator Self
 
typedef const ValuePointer
 
typedef Value Reference
 
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
 
BlockConstIterator myBlockIt
 

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

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.

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.

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.

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

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
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
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.
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.
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.
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.
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.
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'.
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 Function Documentation

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

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.

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: