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

the bidirectional iterator, the cell and the one before it, on items const if Const More...

#include <ADS/sequence/XorList.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 (Cell *p, Cell *c)
 on the cell \( c \), coming from \( p \)
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 cell, \( \mathit{link} \oplus \mathit{prev} \)
Iterator & operator-- (void)
 to the previous cell
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 cell

Friends

template<bool>
class Iterator

Detailed description

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

the bidirectional iterator, the cell and the one before it, on items const if Const

Member typedef documentation

◆ difference_type

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

the distances

◆ iterator_category

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

bidirectional

◆ pointer

template<class T>
template<bool Const>
using ADS::XorList< 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::XorList< 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::XorList< T >::Iterator< Const >::value_type = T

the items

Constructor and destructor documentation

◆ Iterator() [1/3]

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

an iterator on no list

◆ Iterator() [2/3]

template<class T>
template<bool Const>
ADS::XorList< T >::Iterator< Const >::Iterator ( Cell * p,
Cell * c )
inline

on the cell \( c \), coming from \( p \)

◆ Iterator() [3/3]

template<class T>
template<bool Const>
template<bool K>
requires ( Const && ! K )
ADS::XorList< 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::XorList< T >::Iterator< Const >::operator* ( void ) const
inline

the item

◆ operator++() [1/2]

template<class T>
template<bool Const>
Iterator ADS::XorList< 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::XorList< T >::Iterator< Const >::operator++ ( void )
inline

to the next cell, \( \mathit{link} \oplus \mathit{prev} \)

◆ operator--() [1/2]

template<class T>
template<bool Const>
Iterator ADS::XorList< 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::XorList< T >::Iterator< Const >::operator-- ( void )
inline

to the previous cell

◆ operator->()

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

the address of the item

◆ operator==()

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

equal on the same cell

◆ Iterator

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

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