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

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

#include <ADS/sequence/CursorList.h>

Public types

using iterator_category = std::forward_iterator_tag
 the category of the iterator, forward
using value_type = T
 the type of the items
using difference_type = std::ptrdiff_t
 the type of 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 space
 Iterator (Space *S, long c)
 on the item of the cell \( c \) of the space \( S \), the end if \( c = 0 \)
template<bool C>
requires ( Const && ! C )
 Iterator (const Iterator< C > &o)
 the const iterator from the other one
reference operator* (void) const
 the item
pointer operator-> (void) const
 the address of the item
Iterator & operator++ (void)
 to the next cell
Iterator operator++ (int)
 to the next cell, returning the iterator before the step
bool operator== (const Iterator &o) const =default
 equal on the same cell of the same space

Friends

template<bool>
class Iterator

Detailed description

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

the iterator, on items const if Const

Member typedef documentation

◆ difference_type

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

the type of the distances

◆ iterator_category

template<class T>
template<bool Const>
using ADS::CursorList< T >::Iterator< Const >::iterator_category = std::forward_iterator_tag

the category of the iterator, forward

◆ pointer

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

the type of the items

Constructor and destructor documentation

◆ Iterator() [1/3]

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

an iterator on no space

◆ Iterator() [2/3]

template<class T>
template<bool Const>
ADS::CursorList< T >::Iterator< Const >::Iterator ( Space * S,
long c )
inline

on the item of the cell \( c \) of the space \( S \), the end if \( c = 0 \)

◆ Iterator() [3/3]

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

the const iterator from the other one

Member function documentation

◆ operator*()

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

the item

◆ operator++() [1/2]

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

to the next cell, returning the iterator before the step

◆ operator++() [2/2]

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

to the next cell

◆ operator->()

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

the address of the item

◆ operator==()

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

equal on the same cell of the same space

◆ Iterator

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

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