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

the iterator by index, random access, on items const if Const More...

#include <ADS/sequence/TieredVector.h>

Public types

using iterator_category = std::random_access_iterator_tag
 the category of the iterator, random access
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 vector
 Iterator (Owner *v, std::size_t i)
 on the item of index \( i \) of the vector \( v \)
template<bool K>
requires ( Const && ! K )
 Iterator (const Iterator< K > &o)
 the const iterator from the other one
reference operator* (void) const
 the item
pointer operator-> (void) const
 the address of the item
reference operator[] (difference_type k) const
 the item \( k \) places on
Iterator & operator++ (void)
 to the next item
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
Iterator & operator+= (difference_type k)
 \( k \) items on
Iterator & operator-= (difference_type k)
 \( k \) items back
bool operator== (const Iterator &o) const
 equal on the same index
auto operator<=> (const Iterator &o) const
 the order of the indices

Friends

template<bool>
class Iterator
Iterator operator+ (Iterator a, difference_type k)
Iterator operator+ (difference_type k, Iterator a)
Iterator operator- (Iterator a, difference_type k)
difference_type operator- (const Iterator &a, const Iterator &b)

Detailed description

template<class T, class A = std::allocator< T >>
template<bool Const>
class ADS::TieredVector< T, A >::Iterator< Const >

the iterator by index, random access, on items const if Const

Member typedef documentation

◆ difference_type

template<class T, class A = std::allocator< T >>
template<bool Const>
using ADS::TieredVector< T, A >::Iterator< Const >::difference_type = std::ptrdiff_t

the type of the distances

◆ iterator_category

template<class T, class A = std::allocator< T >>
template<bool Const>
using ADS::TieredVector< T, A >::Iterator< Const >::iterator_category = std::random_access_iterator_tag

the category of the iterator, random access

◆ pointer

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

a pointer to an item, constant if Const

◆ reference

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

a reference to an item, constant if Const

◆ value_type

template<class T, class A = std::allocator< T >>
template<bool Const>
using ADS::TieredVector< T, A >::Iterator< Const >::value_type = T

the type of the items

Constructor and destructor documentation

◆ Iterator() [1/3]

template<class T, class A = std::allocator< T >>
template<bool Const>
ADS::TieredVector< T, A >::Iterator< Const >::Iterator ( void )
default

an iterator on no vector

◆ Iterator() [2/3]

template<class T, class A = std::allocator< T >>
template<bool Const>
ADS::TieredVector< T, A >::Iterator< Const >::Iterator ( Owner * v,
std::size_t i )
inline

on the item of index \( i \) of the vector \( v \)

◆ Iterator() [3/3]

template<class T, class A = std::allocator< T >>
template<bool Const>
template<bool K>
requires ( Const && ! K )
ADS::TieredVector< T, A >::Iterator< Const >::Iterator ( const Iterator< K > & o)
inline

the const iterator from the other one

Member function documentation

◆ operator*()

template<class T, class A = std::allocator< T >>
template<bool Const>
reference ADS::TieredVector< T, A >::Iterator< Const >::operator* ( void ) const
inline

the item

◆ operator++() [1/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator ADS::TieredVector< T, A >::Iterator< Const >::operator++ ( int )
inline

to the next item, returning the iterator before the step

◆ operator++() [2/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator & ADS::TieredVector< T, A >::Iterator< Const >::operator++ ( void )
inline

to the next item

◆ operator+=()

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator & ADS::TieredVector< T, A >::Iterator< Const >::operator+= ( difference_type k)
inline

\( k \) items on

◆ operator--() [1/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator ADS::TieredVector< T, A >::Iterator< Const >::operator-- ( int )
inline

to the previous item, returning the iterator before the step

◆ operator--() [2/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator & ADS::TieredVector< T, A >::Iterator< Const >::operator-- ( void )
inline

to the previous item

◆ operator-=()

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator & ADS::TieredVector< T, A >::Iterator< Const >::operator-= ( difference_type k)
inline

\( k \) items back

◆ operator->()

template<class T, class A = std::allocator< T >>
template<bool Const>
pointer ADS::TieredVector< T, A >::Iterator< Const >::operator-> ( void ) const
inline

the address of the item

◆ operator<=>()

template<class T, class A = std::allocator< T >>
template<bool Const>
auto ADS::TieredVector< T, A >::Iterator< Const >::operator<=> ( const Iterator< Const > & o) const
inline

the order of the indices

◆ operator==()

template<class T, class A = std::allocator< T >>
template<bool Const>
bool ADS::TieredVector< T, A >::Iterator< Const >::operator== ( const Iterator< Const > & o) const
inline

equal on the same index

◆ operator[]()

template<class T, class A = std::allocator< T >>
template<bool Const>
reference ADS::TieredVector< T, A >::Iterator< Const >::operator[] ( difference_type k) const
inline

the item \( k \) places on

◆ Iterator

template<class T, class A = std::allocator< T >>
template<bool Const>
template<bool>
friend class Iterator
friend

◆ operator+ [1/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator operator+ ( difference_type k,
Iterator< Const > a )
friend

◆ operator+ [2/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator operator+ ( Iterator< Const > a,
difference_type k )
friend

◆ operator- [1/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
difference_type operator- ( const Iterator< Const > & a,
const Iterator< Const > & b )
friend

◆ operator- [2/2]

template<class T, class A = std::allocator< T >>
template<bool Const>
Iterator operator- ( Iterator< Const > a,
difference_type k )
friend

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