DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes
DGtal::Labels< L, TWord >::ConstEnumerator Class Reference

#include <DGtal/base/Labels.h>

Collaboration diagram for DGtal::Labels< L, TWord >::ConstEnumerator:
[legend]

Public Types

typedef ConstEnumerator Self
 
typedef Label 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

 ~ConstEnumerator ()
 
 ConstEnumerator ()
 
 ConstEnumerator (const Word *address, SizeType firstWord)
 
 ConstEnumerator (const ConstEnumerator &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
 

Private Attributes

const WordmyWordAddress
 
Label myWordLabel
 
Label myLabel
 
Word myWord
 

Detailed Description

template<unsigned int L, typename TWord = DGtal::uint8_t>
class DGtal::Labels< L, TWord >::ConstEnumerator

This class is used to enumerate the set values in the Labels container. A model of boost::ForwardIterator.

Definition at line 105 of file Labels.h.

Member Typedef Documentation

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef DifferenceType DGtal::Labels< L, TWord >::ConstEnumerator::difference_type

Definition at line 116 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef std::ptrdiff_t DGtal::Labels< L, TWord >::ConstEnumerator::DifferenceType

only positive offsets allowed.

Definition at line 111 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef std::forward_iterator_tag DGtal::Labels< L, TWord >::ConstEnumerator::iterator_category

Definition at line 119 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef const Value* DGtal::Labels< L, TWord >::ConstEnumerator::Pointer

Definition at line 109 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef Pointer DGtal::Labels< L, TWord >::ConstEnumerator::pointer

Definition at line 117 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef const Value& DGtal::Labels< L, TWord >::ConstEnumerator::Reference

Definition at line 110 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef Reference DGtal::Labels< L, TWord >::ConstEnumerator::reference

Definition at line 118 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef ConstEnumerator DGtal::Labels< L, TWord >::ConstEnumerator::Self

Definition at line 107 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef std::size_t DGtal::Labels< L, TWord >::ConstEnumerator::size_type

Definition at line 115 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef Label DGtal::Labels< L, TWord >::ConstEnumerator::Value

Definition at line 108 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
typedef Value DGtal::Labels< L, TWord >::ConstEnumerator::value_type

Definition at line 114 of file Labels.h.

Constructor & Destructor Documentation

template<unsigned int L, typename TWord = DGtal::uint8_t>
DGtal::Labels< L, TWord >::ConstEnumerator::~ConstEnumerator ( )

Default destructor.

template<unsigned int L, typename TWord = DGtal::uint8_t>
DGtal::Labels< L, TWord >::ConstEnumerator::ConstEnumerator ( )

Default constructor (Invalid).

template<unsigned int L, typename TWord = DGtal::uint8_t>
DGtal::Labels< L, TWord >::ConstEnumerator::ConstEnumerator ( const Word address,
SizeType  firstWord 
)

Constructor from word address.

Parameters
addressis some Labels.myLabels
firstWordis 0 (begin) or __DGTAL_LABELS_NBWORDS (end)
template<unsigned int L, typename TWord = DGtal::uint8_t>
DGtal::Labels< L, TWord >::ConstEnumerator::ConstEnumerator ( const ConstEnumerator other)

Copy constructor.

Parameters
otherthe object to clone.

Member Function Documentation

template<unsigned int L, typename TWord = DGtal::uint8_t>
bool DGtal::Labels< L, TWord >::ConstEnumerator::operator!= ( const Self other) const

Inequality operator.

Parameters
otherany other iterator.
Returns
'true' iff the iterators points on different elements.
template<unsigned int L, typename TWord = DGtal::uint8_t>
Reference DGtal::Labels< L, TWord >::ConstEnumerator::operator* ( ) const

Dereference operator.

Returns
the current value of the iterator, if valid.
template<unsigned int L, typename TWord = DGtal::uint8_t>
Self& DGtal::Labels< L, TWord >::ConstEnumerator::operator++ ( )

Pre-increment operator.

Returns
a reference to itself.
template<unsigned int L, typename TWord = DGtal::uint8_t>
Self DGtal::Labels< L, TWord >::ConstEnumerator::operator++ ( int  )

Post-increment operator.

Returns
a reference to itself.
template<unsigned int L, typename TWord = DGtal::uint8_t>
Pointer DGtal::Labels< L, TWord >::ConstEnumerator::operator-> ( ) const

Pointer dereference operator.

Returns
a non-mutable pointer on the current value.
template<unsigned int L, typename TWord = DGtal::uint8_t>
Self& DGtal::Labels< L, TWord >::ConstEnumerator::operator= ( const Self other)

Assignment.

Parameters
otherthe object to copy.
Returns
a reference on 'this'.
template<unsigned int L, typename TWord = DGtal::uint8_t>
bool DGtal::Labels< L, TWord >::ConstEnumerator::operator== ( const Self other) const

Equality operator.

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

Field Documentation

template<unsigned int L, typename TWord = DGtal::uint8_t>
Label DGtal::Labels< L, TWord >::ConstEnumerator::myLabel
private

current label

Definition at line 124 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
Word DGtal::Labels< L, TWord >::ConstEnumerator::myWord
private

current word (modified until 0).

Definition at line 125 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
const Word* DGtal::Labels< L, TWord >::ConstEnumerator::myWordAddress
private

current address of word

Definition at line 122 of file Labels.h.

template<unsigned int L, typename TWord = DGtal::uint8_t>
Label DGtal::Labels< L, TWord >::ConstEnumerator::myWordLabel
private

index of first label of the current word.

Definition at line 123 of file Labels.h.


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