DGtal  0.9.4beta
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator Class Reference

#include <DGtal/base/IndexedListWithBlocks.h>

Collaboration diagram for DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator:
[legend]

Public Types

typedef ConstIterator Self
 
typedef TValue 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

 ~ConstIterator ()
 
 ConstIterator ()
 
 ConstIterator (const ConstIterator &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

 ConstIterator (const FirstBlock &block, unsigned int idx)
 

Protected Attributes

unsigned int myIdx
 
unsigned int myNbValues
 
const ValuemyValues
 
const AnyBlockmyNext
 

Friends

class IndexedListWithBlocks
 

Detailed Description

template<typename TValue, unsigned int N, unsigned int M>
class DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator

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

Definition at line 451 of file IndexedListWithBlocks.h.

Member Typedef Documentation

template<typename TValue, unsigned int N, unsigned int M>
typedef DifferenceType DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::difference_type

Definition at line 462 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef std::ptrdiff_t DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::DifferenceType

only positive offsets allowed.

Definition at line 457 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef std::forward_iterator_tag DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::iterator_category

Definition at line 466 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef const Value* DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::Pointer

Definition at line 455 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef Pointer DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::pointer

Definition at line 463 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef const Value& DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::Reference

Definition at line 456 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef Reference DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::reference

Definition at line 464 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef ConstIterator DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::Self

Definition at line 453 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef std::size_t DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::size_type

Definition at line 461 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef TValue DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::Value

Definition at line 454 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
typedef Value DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::value_type

Definition at line 460 of file IndexedListWithBlocks.h.

Constructor & Destructor Documentation

template<typename TValue, unsigned int N, unsigned int M>
DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::ConstIterator ( const FirstBlock block,
unsigned int  idx 
)
protected

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

template<typename TValue, unsigned int N, unsigned int M>
DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::~ConstIterator ( )

Default destructor.

template<typename TValue, unsigned int N, unsigned int M>
DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::ConstIterator ( )

Default constructor.

template<typename TValue, unsigned int N, unsigned int M>
DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::ConstIterator ( const ConstIterator other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

template<typename TValue, unsigned int N, unsigned int M>
bool DGtal::IndexedListWithBlocks< TValue, 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 TValue, unsigned int N, unsigned int M>
Reference DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::operator* ( ) const

Dereference operator.

Returns
the current value of the iterator, if valid.
template<typename TValue, unsigned int N, unsigned int M>
Self& DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::operator++ ( )

Pre-increment operator.

Returns
a reference to itself.
template<typename TValue, unsigned int N, unsigned int M>
Self DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::operator++ ( int  )

Post-increment operator.

Returns
a reference to itself.
template<typename TValue, unsigned int N, unsigned int M>
Self& DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::operator+= ( DifferenceType  n)

Addition operator. Moves the iterator at position + n.

Parameters
nany positive integer
Returns
a reference to itself.
template<typename TValue, unsigned int N, unsigned int M>
Pointer DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::operator-> ( ) const

Pointer dereference operator.

Returns
a non-mutable pointer on the current value.
template<typename TValue, unsigned int N, unsigned int M>
Self& DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::operator= ( const Self other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.
template<typename TValue, unsigned int N, unsigned int M>
bool DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::operator== ( const Self other) const

Equality operator.

Parameters
otherany other iterator.
Returns
'true' iff the iterators points on the same element.
template<typename TValue, unsigned int N, unsigned int M>
Reference DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::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 TValue, unsigned int N, unsigned int M>
friend class IndexedListWithBlocks
friend

Definition at line 475 of file IndexedListWithBlocks.h.

Field Documentation

template<typename TValue, unsigned int N, unsigned int M>
unsigned int DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::myIdx
protected

current index in myValues of the iterator

Definition at line 470 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
unsigned int DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::myNbValues
protected

number of valid values in array myValues

Definition at line 471 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
const AnyBlock* DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::myNext
protected

pointer to next block or 0 if last block.

Definition at line 473 of file IndexedListWithBlocks.h.

template<typename TValue, unsigned int N, unsigned int M>
const Value* DGtal::IndexedListWithBlocks< TValue, N, M >::ConstIterator::myValues
protected

array of myNbValues values.

Definition at line 472 of file IndexedListWithBlocks.h.


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