MySQL 9.1.0
Source Code Documentation
container::Atomics_array< T, I, A >::Iterator Class Reference

Iterator helper class to iterate over the array, from 0 to the array size. More...

#include <atomics_array.h>

Public Types

using difference_type = std::ptrdiff_t
 
using value_type = T
 
using pointer = T *
 
using reference = T
 
using iterator_category = std::forward_iterator_tag
 

Public Member Functions

 Iterator (Atomics_array< T, I, A > const &parent, size_t position)
 
 Iterator (const Iterator &rhs)
 
 Iterator (Iterator &&rhs)
 
virtual ~Iterator ()=default
 
Iteratoroperator= (const Iterator &rhs)
 
Iteratoroperator= (Iterator &&rhs)
 
Iteratoroperator++ ()
 
reference operator* () const
 
Iterator operator++ (int)
 
pointer operator-> () const
 
bool operator== (Iterator const &rhs) const
 
bool operator!= (Iterator const &rhs) const
 

Private Attributes

size_t m_current {0}
 The position of the element this iterator is pointing to. More...
 
Atomics_array< T, I, A > const * m_parent {nullptr}
 The reference to the queue holding the elements. More...
 

Detailed Description

template<typename T, typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
class container::Atomics_array< T, I, A >::Iterator

Iterator helper class to iterate over the array, from 0 to the array size.

Check C++ documentation on Iterator named requirements for more information on the implementation.

Member Typedef Documentation

◆ difference_type

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
using container::Atomics_array< T, I, A >::Iterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
using container::Atomics_array< T, I, A >::Iterator::iterator_category = std::forward_iterator_tag

◆ pointer

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
using container::Atomics_array< T, I, A >::Iterator::pointer = T *

◆ reference

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
using container::Atomics_array< T, I, A >::Iterator::reference = T

◆ value_type

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
using container::Atomics_array< T, I, A >::Iterator::value_type = T

Constructor & Destructor Documentation

◆ Iterator() [1/3]

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator::Iterator ( Atomics_array< T, I, A > const &  parent,
size_t  position 
)
explicit

◆ Iterator() [2/3]

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator::Iterator ( const Iterator rhs)

◆ Iterator() [3/3]

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator::Iterator ( Iterator &&  rhs)

◆ ~Iterator()

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
virtual container::Atomics_array< T, I, A >::Iterator::~Iterator ( )
virtualdefault

Member Function Documentation

◆ operator!=()

template<typename T , typename I , typename A >
bool container::Atomics_array< T, I, A >::Iterator::operator!= ( Iterator const &  rhs) const

◆ operator*()

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator::reference container::Atomics_array< T, I, A >::Iterator::operator*

◆ operator++() [1/2]

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator & container::Atomics_array< T, I, A >::Iterator::operator++

◆ operator++() [2/2]

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator container::Atomics_array< T, I, A >::Iterator::operator++ ( int  )

◆ operator->()

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator::pointer container::Atomics_array< T, I, A >::Iterator::operator->

◆ operator=() [1/2]

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator & container::Atomics_array< T, I, A >::Iterator::operator= ( const Iterator rhs)

◆ operator=() [2/2]

template<typename T , typename I , typename A >
container::Atomics_array< T, I, A >::Iterator & container::Atomics_array< T, I, A >::Iterator::operator= ( Iterator &&  rhs)

◆ operator==()

template<typename T , typename I , typename A >
bool container::Atomics_array< T, I, A >::Iterator::operator== ( Iterator const &  rhs) const

Member Data Documentation

◆ m_current

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
size_t container::Atomics_array< T, I, A >::Iterator::m_current {0}
private

The position of the element this iterator is pointing to.

◆ m_parent

template<typename T , typename I = container::Padded_indexing<T>, typename A = std::nullptr_t>
Atomics_array<T, I, A> const* container::Atomics_array< T, I, A >::Iterator::m_parent {nullptr}
private

The reference to the queue holding the elements.


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