DGtal 1.4.0
Loading...
Searching...
No Matches
DGtal::Labels< L, TWord >::ConstEnumerator Class Reference

#include <DGtal/base/Labels.h>

Public Types

typedef ConstEnumerator Self
 
typedef Label Value
 
typedef const ValuePointer
 
typedef const ValueReference
 
typedef std::ptrdiff_t DifferenceType
 only positive offsets allowed.
 
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
 current address of word
 
Label myWordLabel
 index of first label of the current word.
 
Label myLabel
 current label
 
Word myWord
 current word (modified until 0).
 

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

◆ difference_type

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.

◆ DifferenceType

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.

◆ iterator_category

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.

◆ Pointer

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.

◆ pointer

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.

◆ Reference

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.

◆ reference

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.

◆ Self

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.

◆ size_type

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.

◆ Value

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.

◆ value_type

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

◆ ~ConstEnumerator()

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

Default destructor.

◆ ConstEnumerator() [1/3]

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

Default constructor (Invalid).

◆ ConstEnumerator() [2/3]

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)

◆ ConstEnumerator() [3/3]

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

◆ operator!=()

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.

◆ operator*()

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.

◆ operator++() [1/2]

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

Pre-increment operator.

Returns
a reference to itself.

◆ operator++() [2/2]

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.

◆ operator->()

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.

◆ operator=()

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

◆ operator==()

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

◆ myLabel

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.

◆ myWord

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.

◆ myWordAddress

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.

◆ myWordLabel

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: