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

#include <DGtal/base/LabelledMap.h>

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

Public Types

typedef BlockConstIterator Self
 
typedef TData Value
 
typedef const ValuePointer
 
typedef const ValueReference
 
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

 ~BlockConstIterator ()
 
 BlockConstIterator ()
 
 BlockConstIterator (const BlockConstIterator &other)
 
Selfoperator= (const Self &other)
 
Reference operator* () const
 
Pointer operator-> () const
 
Selfoperator++ ()
 
Self operator++ (int)
 
Selfoperator+= (DifferenceType n)
 
Reference operator[] (DifferenceType n) const
 
bool operator== (const Self &other) const
 
bool operator!= (const Self &other) const
 

Protected Member Functions

 BlockConstIterator (const __FirstBlock &block, unsigned int idx, unsigned int size)
 

Protected Attributes

unsigned int myIdx
 
unsigned int myNbDatas
 
const DatamyDatas
 
const __AnyBlockmyNext
 

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 >::BlockConstIterator

Pseudo-random iterator to visit LabelledMap (it is only a random forward iterator). Model of boost::ForwardIterator. Provides also + and += arithmetic.

Definition at line 511 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 >::BlockConstIterator::difference_type

Definition at line 522 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 >::BlockConstIterator::DifferenceType

only positive offsets allowed.

Definition at line 517 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 >::BlockConstIterator::iterator_category

Definition at line 526 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 >::BlockConstIterator::Pointer

Definition at line 515 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 >::BlockConstIterator::pointer

Definition at line 523 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 >::BlockConstIterator::Reference

Definition at line 516 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 >::BlockConstIterator::reference

Definition at line 524 of file LabelledMap.h.

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

Definition at line 513 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 >::BlockConstIterator::size_type

Definition at line 521 of file LabelledMap.h.

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

Definition at line 514 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 >::BlockConstIterator::value_type

Definition at line 520 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 >::BlockConstIterator::BlockConstIterator ( const __FirstBlock block,
unsigned int  idx,
unsigned int  size 
)
protected

Constructor from first block and index. Used by class LabelledMap.

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

Default destructor.

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

Default constructor.

template<typename TData, unsigned int L, typename TWord, unsigned int N, unsigned int M>
DGtal::LabelledMap< TData, L, TWord, N, M >::BlockConstIterator::BlockConstIterator ( const BlockConstIterator 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>
bool DGtal::LabelledMap< TData, L, TWord, N, M >::BlockConstIterator::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 >::BlockConstIterator::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 >::BlockConstIterator::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 >::BlockConstIterator::operator++ ( int  )

Post-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 >::BlockConstIterator::operator+= ( DifferenceType  n)

Addition operator. Moves the iterator at position + n.

Parameters
nany positive integer
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 >::BlockConstIterator::operator-> ( ) const

Pointer dereference operator.

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 >::BlockConstIterator::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 >::BlockConstIterator::operator== ( const Self other) const

Equality operator.

Parameters
otherany other iterator.
Returns
'true' iff the iterators points on the same element.
template<typename TData, unsigned int L, typename TWord, unsigned int N, unsigned int M>
Reference DGtal::LabelledMap< TData, L, TWord, N, M >::BlockConstIterator::operator[] ( DifferenceType  n) const

Positive offset dereference operator. Moves the iterator at position + n.

Parameters
nany positive integer
Returns
a reference to itself.

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 535 of file LabelledMap.h.

Field Documentation

template<typename TData, unsigned int L, typename TWord, unsigned int N, unsigned int M>
const Data* DGtal::LabelledMap< TData, L, TWord, N, M >::BlockConstIterator::myDatas
protected

array of myNbDatas datas.

Definition at line 532 of file LabelledMap.h.

template<typename TData, unsigned int L, typename TWord, unsigned int N, unsigned int M>
unsigned int DGtal::LabelledMap< TData, L, TWord, N, M >::BlockConstIterator::myIdx
protected

current index in myDatas of the iterator

Definition at line 530 of file LabelledMap.h.

template<typename TData, unsigned int L, typename TWord, unsigned int N, unsigned int M>
unsigned int DGtal::LabelledMap< TData, L, TWord, N, M >::BlockConstIterator::myNbDatas
protected

number of valid datas in array myDatas

Definition at line 531 of file LabelledMap.h.

template<typename TData, unsigned int L, typename TWord, unsigned int N, unsigned int M>
const __AnyBlock* DGtal::LabelledMap< TData, L, TWord, N, M >::BlockConstIterator::myNext
protected

pointer to next block or 0 if last block.

Definition at line 533 of file LabelledMap.h.


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