ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::SEList< T >::Iterator< Const > Class Template Reference

the bidirectional iterator, on items const if Const More...

#include <ADS/sequence/SEList.h>

Public types

using iterator_category = std::bidirectional_iterator_tag
 bidirectional
using value_type = T
 the items
using difference_type = std::ptrdiff_t
 the distances
using reference = std::conditional_t< Const , const T & , T & >
 a reference to an item, constant if Const
using pointer = std::conditional_t< Const , const T * , T * >
 a pointer to an item, constant if Const

Public member functions

 Iterator (void)=default
 an iterator on no list
 Iterator (Owner *l, Node *u, std::size_t j)
 on the item \( j \) of the block \( u \) of l
template<bool K>
requires ( Const && ! K )
 Iterator (const Iterator< K > &o)
 the constant iterator from the mutable one
reference operator* (void) const
 the item
pointer operator-> (void) const
 the address of the item
Iterator & operator++ (void)
 to the next item, the next block after the last one of a block
Iterator & operator-- (void)
 to the previous item
Iterator operator++ (int)
 to the next item, returning the iterator before the step
Iterator operator-- (int)
 to the previous item, returning the iterator before the step
bool operator== (const Iterator &o) const
 equal on the same item

Friends

template<bool>
class Iterator

Detailed description

template<class T>
template<bool Const>
class ADS::SEList< T >::Iterator< Const >

the bidirectional iterator, on items const if Const

Member typedef documentation

◆ difference_type

template<class T>
template<bool Const>
using ADS::SEList< T >::Iterator< Const >::difference_type = std::ptrdiff_t

the distances

◆ iterator_category

template<class T>
template<bool Const>
using ADS::SEList< T >::Iterator< Const >::iterator_category = std::bidirectional_iterator_tag

bidirectional

◆ pointer

template<class T>
template<bool Const>
using ADS::SEList< T >::Iterator< Const >::pointer = std::conditional_t< Const , const T * , T * >

a pointer to an item, constant if Const

◆ reference

template<class T>
template<bool Const>
using ADS::SEList< T >::Iterator< Const >::reference = std::conditional_t< Const , const T & , T & >

a reference to an item, constant if Const

◆ value_type

template<class T>
template<bool Const>
using ADS::SEList< T >::Iterator< Const >::value_type = T

the items

Constructor and destructor documentation

◆ Iterator() [1/3]

template<class T>
template<bool Const>
ADS::SEList< T >::Iterator< Const >::Iterator ( void )
default

an iterator on no list

◆ Iterator() [2/3]

template<class T>
template<bool Const>
ADS::SEList< T >::Iterator< Const >::Iterator ( Owner * l,
Node * u,
std::size_t j )
inline

on the item \( j \) of the block \( u \) of l

◆ Iterator() [3/3]

template<class T>
template<bool Const>
template<bool K>
requires ( Const && ! K )
ADS::SEList< T >::Iterator< Const >::Iterator ( const Iterator< K > & o)
inline

the constant iterator from the mutable one

Member function documentation

◆ operator*()

template<class T>
template<bool Const>
reference ADS::SEList< T >::Iterator< Const >::operator* ( void ) const
inline

the item

◆ operator++() [1/2]

template<class T>
template<bool Const>
Iterator ADS::SEList< T >::Iterator< Const >::operator++ ( int )
inline

to the next item, returning the iterator before the step

◆ operator++() [2/2]

template<class T>
template<bool Const>
Iterator & ADS::SEList< T >::Iterator< Const >::operator++ ( void )
inline

to the next item, the next block after the last one of a block

◆ operator--() [1/2]

template<class T>
template<bool Const>
Iterator ADS::SEList< T >::Iterator< Const >::operator-- ( int )
inline

to the previous item, returning the iterator before the step

◆ operator--() [2/2]

template<class T>
template<bool Const>
Iterator & ADS::SEList< T >::Iterator< Const >::operator-- ( void )
inline

to the previous item

◆ operator->()

template<class T>
template<bool Const>
pointer ADS::SEList< T >::Iterator< Const >::operator-> ( void ) const
inline

the address of the item

◆ operator==()

template<class T>
template<bool Const>
bool ADS::SEList< T >::Iterator< Const >::operator== ( const Iterator< Const > & o) const
inline

equal on the same item

◆ Iterator

template<class T>
template<bool Const>
template<bool>
friend class Iterator
friend

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