Kanzi 4.1.0
kanzi::indexed_list< T >::IteratorBase< HostType > Class Template Reference

Base class for iterator and const_iterator. More...

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

Public Types

using difference_type
 Difference type. Required for stable_partition.
 
using iterator_category
 Iterator category.
 
using value_type
 Value type.
 

Public Member Functions

size_t getIndex () const
 Gets the index the iterator is pointing at.
 
 IteratorBase (const IteratorBase &other)=default
 Copy constructor.
 
 IteratorBase (HostType &host)
 Constructor to end.
 
 IteratorBase (HostType &host, size_t index)
 Constructor to given index.
 
 IteratorBase (IteratorBase &&other)=default
 Move constructor.
 
bool iteratorEquals (const HostType *otherHost, size_t otherIndex) const
 Indicates whether this iterator equals given parameters.
 
const Toperator* () const
 Const dereference operator.
 
const Toperator-> () const
 Const member access operator.
 
IteratorBaseoperator= (const IteratorBase &other)=default
 Copy operator.
 
IteratorBaseoperator= (IteratorBase &&other)=default
 Move operator.
 

Protected Attributes

HostTypem_host
 Host list.
 
size_t m_index
 Index being iterated.
 

Detailed Description

template<typename T>
template<typename HostType>
class kanzi::indexed_list< T >::IteratorBase< HostType >

Base class for iterator and const_iterator.

Member Typedef Documentation

◆ difference_type

template<typename T >
template<typename HostType >
using kanzi::indexed_list< T >::IteratorBase< HostType >::difference_type

Difference type. Required for stable_partition.

◆ iterator_category

template<typename T >
template<typename HostType >
using kanzi::indexed_list< T >::IteratorBase< HostType >::iterator_category

Iterator category.

◆ value_type

template<typename T >
template<typename HostType >
using kanzi::indexed_list< T >::IteratorBase< HostType >::value_type

Value type.

Constructor & Destructor Documentation

◆ IteratorBase() [1/4]

template<typename T >
template<typename HostType >
kanzi::indexed_list< T >::IteratorBase< HostType >::IteratorBase ( HostType & host)
inlineexplicit

Constructor to end.

Parameters
hostHost container.

◆ IteratorBase() [2/4]

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

Constructor to given index.

Parameters
hostHost container.
indexIndex to point at.

◆ IteratorBase() [3/4]

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

Copy constructor.

Parameters
otherSource iterator.

◆ IteratorBase() [4/4]

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

Move constructor.

Parameters
otherSource iterator.

Member Function Documentation

◆ operator=() [1/2]

Copy operator.

Parameters
otherSource iterator.

◆ operator=() [2/2]

Move operator.

Parameters
otherSource iterator.

◆ getIndex()

template<typename T >
template<typename HostType >
size_t kanzi::indexed_list< T >::IteratorBase< HostType >::getIndex ( ) const
inline

Gets the index the iterator is pointing at.

Returns
Element index.

◆ iteratorEquals()

template<typename T >
template<typename HostType >
bool kanzi::indexed_list< T >::IteratorBase< HostType >::iteratorEquals ( const HostType * otherHost,
size_t otherIndex ) const
inline

Indicates whether this iterator equals given parameters.

Parameters
otherHostAnother host.
otherIndexAnother index.

◆ operator*()

template<typename T >
template<typename HostType >
const T & kanzi::indexed_list< T >::IteratorBase< HostType >::operator* ( ) const
inline

Const dereference operator.

Returns
Const reference to value at iterator.

◆ operator->()

template<typename T >
template<typename HostType >
const T * kanzi::indexed_list< T >::IteratorBase< HostType >::operator-> ( ) const
inline

Const member access operator.

Returns
Const pointer to value at iterator.

Member Data Documentation

◆ m_host

template<typename T >
template<typename HostType >
HostType* kanzi::indexed_list< T >::IteratorBase< HostType >::m_host
protected

Host list.

◆ m_index

template<typename T >
template<typename HostType >
size_t kanzi::indexed_list< T >::IteratorBase< HostType >::m_index
protected

Index being iterated.


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