guanaqo 1.0.0-alpha.27
Utilities for scientific software
Loading...
Searching...
No Matches
guanaqo::CircularIndexIterator< IndexT > Struct Template Reference

#include <guanaqo/ringbuffer.hpp>

Detailed Description

template<class IndexT = size_t>
struct guanaqo::CircularIndexIterator< IndexT >

Definition at line 35 of file ringbuffer.hpp.

Collaboration diagram for guanaqo::CircularIndexIterator< IndexT >:

Public Types

using Index = IndexT
using Indices = CircularIndices<Index>
using value_type = Indices
using reference = value_type
using difference_type = std::ptrdiff_t
using pointer = void
using iterator_category = std::input_iterator_tag

Public Member Functions

 CircularIndexIterator ()
 CircularIndexIterator (Indices i, Index max)
reference operator* () const
CircularIndexIteratoroperator++ ()
CircularIndexIteratoroperator-- ()
CircularIndexIterator operator++ (int)
CircularIndexIterator operator-- (int)

Public Attributes

Indices i
Index max

(Note that these are not member symbols.)

template<class IndexT>
bool operator== (CircularIndexIterator< IndexT > a, CircularIndexIterator< IndexT > b)
template<class IndexT>
bool operator!= (CircularIndexIterator< IndexT > a, CircularIndexIterator< IndexT > b)

Member Typedef Documentation

◆ Index

template<class IndexT = size_t>
using guanaqo::CircularIndexIterator< IndexT >::Index = IndexT

Definition at line 36 of file ringbuffer.hpp.

◆ Indices

template<class IndexT = size_t>
using guanaqo::CircularIndexIterator< IndexT >::Indices = CircularIndices<Index>

Definition at line 37 of file ringbuffer.hpp.

◆ value_type

template<class IndexT = size_t>
using guanaqo::CircularIndexIterator< IndexT >::value_type = Indices

Definition at line 45 of file ringbuffer.hpp.

◆ reference

template<class IndexT = size_t>
using guanaqo::CircularIndexIterator< IndexT >::reference = value_type

Definition at line 46 of file ringbuffer.hpp.

◆ difference_type

template<class IndexT = size_t>
using guanaqo::CircularIndexIterator< IndexT >::difference_type = std::ptrdiff_t

Definition at line 47 of file ringbuffer.hpp.

◆ pointer

template<class IndexT = size_t>
using guanaqo::CircularIndexIterator< IndexT >::pointer = void

Definition at line 48 of file ringbuffer.hpp.

◆ iterator_category

template<class IndexT = size_t>
using guanaqo::CircularIndexIterator< IndexT >::iterator_category = std::input_iterator_tag

Definition at line 49 of file ringbuffer.hpp.

Constructor & Destructor Documentation

◆ CircularIndexIterator() [1/2]

template<class IndexT = size_t>
guanaqo::CircularIndexIterator< IndexT >::CircularIndexIterator ( )
inline

Definition at line 39 of file ringbuffer.hpp.

◆ CircularIndexIterator() [2/2]

template<class IndexT = size_t>
guanaqo::CircularIndexIterator< IndexT >::CircularIndexIterator ( Indices i,
Index max )
inline

Definition at line 40 of file ringbuffer.hpp.

Member Function Documentation

◆ operator*()

template<class IndexT = size_t>
reference guanaqo::CircularIndexIterator< IndexT >::operator* ( ) const
inline

Definition at line 51 of file ringbuffer.hpp.

◆ operator++() [1/2]

template<class IndexT = size_t>
CircularIndexIterator & guanaqo::CircularIndexIterator< IndexT >::operator++ ( )
inline

Definition at line 52 of file ringbuffer.hpp.

◆ operator--() [1/2]

template<class IndexT = size_t>
CircularIndexIterator & guanaqo::CircularIndexIterator< IndexT >::operator-- ( )
inline

Definition at line 58 of file ringbuffer.hpp.

◆ operator++() [2/2]

template<class IndexT = size_t>
CircularIndexIterator guanaqo::CircularIndexIterator< IndexT >::operator++ ( int )
inline

Definition at line 64 of file ringbuffer.hpp.

◆ operator--() [2/2]

template<class IndexT = size_t>
CircularIndexIterator guanaqo::CircularIndexIterator< IndexT >::operator-- ( int )
inline

Definition at line 69 of file ringbuffer.hpp.

◆ operator==()

template<class IndexT>
bool operator== ( CircularIndexIterator< IndexT > a,
CircularIndexIterator< IndexT > b )
related
Note
Only valid for two indices in the same range.

Definition at line 79 of file ringbuffer.hpp.

◆ operator!=()

template<class IndexT>
bool operator!= ( CircularIndexIterator< IndexT > a,
CircularIndexIterator< IndexT > b )
related
Note
Only valid for two indices in the same range.

Definition at line 87 of file ringbuffer.hpp.

Member Data Documentation

◆ i

template<class IndexT = size_t>
Indices guanaqo::CircularIndexIterator< IndexT >::i

Definition at line 42 of file ringbuffer.hpp.

◆ max

template<class IndexT = size_t>
Index guanaqo::CircularIndexIterator< IndexT >::max

Definition at line 43 of file ringbuffer.hpp.


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