Kanzi 4.1.0
kanzi::indexed_list< T >::const_iterator Class Reference

Const iterator over the values. More...

#include <kanzi/core/cpp/indexed_list.hpp>

Inheritance diagram for kanzi::indexed_list< T >::const_iterator:
[legend]

Public Types

using difference_type
 Difference type.
 
using iterator_category
 Iterator category.
 
using parent_type
 Parent class type.
 
using pointer
 Pointer type.
 
using reference
 Reference type.
 
using value_type
 Value type.
 
- Public Types inherited from kanzi::indexed_list< T >::IteratorBase< const indexed_list >
using difference_type
 Difference type. Required for stable_partition.
 
using iterator_category
 Iterator category.
 
using value_type
 Value type.
 

Public Member Functions

 const_iterator (const const_iterator &other)=default
 Default copy constructor.
 
 const_iterator (const indexed_list &host)
 Default constructor.
 
 const_iterator (const indexed_list &host, size_t index)
 Constructor to given index.
 
 const_iterator (const_iterator &&other)=default
 Default move constructor.
 
const element_typegetElement () const
 Gets a reference to the element at location.
 
bool operator!= (const const_iterator &other) const
 Not equals operator.
 
const_iteratoroperator++ ()
 Increment operator (prefix).
 
const_iterator operator++ (int)
 Increment operator (postfix).
 
const_iteratoroperator-- ()
 Decrement operator (prefix).
 
const_iterator operator-- (int)
 Decrement operator (postfix).
 
const_iteratoroperator= (const const_iterator &other)=default
 Default copy operator.
 
const_iteratoroperator= (const_iterator &&other)=default
 Default move operator.
 
bool operator== (const const_iterator &other) const
 Equals operator.
 
- Public Member Functions inherited from kanzi::indexed_list< T >::IteratorBase< const indexed_list >
size_t getIndex () const
 Gets the index the iterator is pointing at.
 
 IteratorBase (const indexed_list &host)
 Constructor to end.
 
 IteratorBase (const indexed_list &host, size_t index)
 Constructor to given index.
 
 IteratorBase (const IteratorBase &other)=default
 Copy constructor.
 
 IteratorBase (IteratorBase &&other)=default
 Move constructor.
 
bool iteratorEquals (const const indexed_list *otherHost, size_t otherIndex) const
 Indicates whether this iterator equals given parameters.
 
const T & operator* () const
 Const dereference operator.
 
const T * operator-> () const
 Const member access operator.
 
IteratorBaseoperator= (const IteratorBase &other)=default
 Copy operator.
 
IteratorBaseoperator= (IteratorBase &&other)=default
 Move operator.
 

Additional Inherited Members

- Protected Attributes inherited from kanzi::indexed_list< T >::IteratorBase< const indexed_list >
const indexed_listm_host
 Host list.
 
size_t m_index
 Index being iterated.
 

Detailed Description

template<typename T>
class kanzi::indexed_list< T >::const_iterator

Const iterator over the values.

Not invalidated if the container is resized.

Member Typedef Documentation

◆ parent_type

template<typename T >
using kanzi::indexed_list< T >::const_iterator::parent_type

Parent class type.

◆ difference_type

template<typename T >
using kanzi::indexed_list< T >::const_iterator::difference_type

Difference type.

◆ iterator_category

template<typename T >
using kanzi::indexed_list< T >::const_iterator::iterator_category

Iterator category.

◆ value_type

template<typename T >
using kanzi::indexed_list< T >::const_iterator::value_type

Value type.

◆ pointer

template<typename T >
using kanzi::indexed_list< T >::const_iterator::pointer

Pointer type.

◆ reference

template<typename T >
using kanzi::indexed_list< T >::const_iterator::reference

Reference type.

Constructor & Destructor Documentation

◆ const_iterator() [1/4]

template<typename T >
kanzi::indexed_list< T >::const_iterator::const_iterator ( const indexed_list & host)
inlineexplicit

Default constructor.

Qualifies as invalid iterator or end.

Parameters
hostHost list.

◆ const_iterator() [2/4]

template<typename T >
kanzi::indexed_list< T >::const_iterator::const_iterator ( const indexed_list & host,
size_t index )
inlineexplicit

Constructor to given index.

Parameters
hostHost list.
indexIndex to point at.

◆ const_iterator() [3/4]

template<typename T >
kanzi::indexed_list< T >::const_iterator::const_iterator ( const const_iterator & other)
default

Default copy constructor.

Parameters
otherSource iterator.

◆ const_iterator() [4/4]

template<typename T >
kanzi::indexed_list< T >::const_iterator::const_iterator ( const_iterator && other)
default

Default move constructor.

Parameters
otherSource iterator.

Member Function Documentation

◆ operator=() [1/2]

template<typename T >
const_iterator & kanzi::indexed_list< T >::const_iterator::operator= ( const const_iterator & other)
default

Default copy operator.

Parameters
otherSource iterator.

◆ operator=() [2/2]

template<typename T >
const_iterator & kanzi::indexed_list< T >::const_iterator::operator= ( const_iterator && other)
default

Default move operator.

Parameters
otherSource iterator.

◆ getElement()

template<typename T >
const element_type & kanzi::indexed_list< T >::const_iterator::getElement ( ) const
inline

Gets a reference to the element at location.

Returns
Reference to the element.

◆ operator++() [1/2]

template<typename T >
const_iterator & kanzi::indexed_list< T >::const_iterator::operator++ ( )
inline

Increment operator (prefix).

Returns
Reference to this iterator.

◆ operator++() [2/2]

template<typename T >
const_iterator kanzi::indexed_list< T >::const_iterator::operator++ ( int )
inline

Increment operator (postfix).

Returns
Iterator value before increment.

◆ operator--() [1/2]

template<typename T >
const_iterator & kanzi::indexed_list< T >::const_iterator::operator-- ( )
inline

Decrement operator (prefix).

Returns
Reference to this iterator.

◆ operator--() [2/2]

template<typename T >
const_iterator kanzi::indexed_list< T >::const_iterator::operator-- ( int )
inline

Decrement operator (postfix).

Returns
Iterator value before decrement.

◆ operator==()

template<typename T >
bool kanzi::indexed_list< T >::const_iterator::operator== ( const const_iterator & other) const
inline

Equals operator.

Parameters
otherOther iterator.
Returns
If iterators are equal true, false otherwise.

◆ operator!=()

template<typename T >
bool kanzi::indexed_list< T >::const_iterator::operator!= ( const const_iterator & other) const
inline

Not equals operator.

Parameters
otherOther iterator.
Returns
If iterators are not equal true, false otherwise.

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