Skip to content

ForwardIteratorBase

More...

#include "Core/Nodes/Iterators.h"

Public Types

Name
using std::ptrdiff_tdifference_type
using std::forward_iterator_tagiterator_category
using typename std::conditional< IsConst, const Value *, Value * >::typepointer
using typename std::conditional< IsConst, const Value &, Value & >::typereference
using typename std::conditional< IsConst, const Value, Value >::typevalue_type

Public Functions

Name
referenceoperator*()
Iterator &operator++()
Iteratoroperator++(int )
pointeroperator->()

Protected Functions

Name
ForwardIteratorBase()
referencedereference() const<br>Return a reference to the current element (reference to a value type, not a pointer).
boolequals(const Iterator & b) const<br>Determines whether this iterator is pointing to the same element as another one (used by the == operator)
voidnext()<br>Advance the iterator.
pointerptr() const<br>Return a raw pointer to the current element.
Iterator *self()<br>CRTP self pointer (pointer to the derived type)
const Iterator *self() const<br>CRTP const self pointer.
boolvalid() const<br>Check whether the iterator is pointing at a valid element (eg. not the end of a container)

Friends

Name
booloperator!=(const Iterator & a, const Iterator & b)
booloperator==(const Iterator & a, const Iterator & b)

Detailed Description

cpp
template <typename Iterator ,
typename Value ,
bool IsConst>
class ForwardIteratorBase;
template <typename Iterator ,
typename Value ,
bool IsConst>
class ForwardIteratorBase;

Public Types Documentation

using difference_type

cpp
using ForwardIteratorBase< Iterator, Value, IsConst >::difference_type =  std::ptrdiff_t;
using ForwardIteratorBase< Iterator, Value, IsConst >::difference_type =  std::ptrdiff_t;

using iterator_category

cpp
using ForwardIteratorBase< Iterator, Value, IsConst >::iterator_category =  std::forward_iterator_tag;
using ForwardIteratorBase< Iterator, Value, IsConst >::iterator_category =  std::forward_iterator_tag;

using pointer

cpp
using ForwardIteratorBase< Iterator, Value, IsConst >::pointer =  typename std::conditional<IsConst, const Value*, Value*>::type;
using ForwardIteratorBase< Iterator, Value, IsConst >::pointer =  typename std::conditional<IsConst, const Value*, Value*>::type;

using reference

cpp
using ForwardIteratorBase< Iterator, Value, IsConst >::reference =  typename std::conditional<IsConst, const Value&, Value&>::type;
using ForwardIteratorBase< Iterator, Value, IsConst >::reference =  typename std::conditional<IsConst, const Value&, Value&>::type;

using value_type

cpp
using ForwardIteratorBase< Iterator, Value, IsConst >::value_type =  typename std::conditional<IsConst, const Value, Value>::type;
using ForwardIteratorBase< Iterator, Value, IsConst >::value_type =  typename std::conditional<IsConst, const Value, Value>::type;

Public Functions Documentation

function operator*

cpp
inline reference operator*()
inline reference operator*()

function operator++

cpp
inline Iterator & operator++()
inline Iterator & operator++()

function operator++

cpp
inline Iterator operator++(
    int 
)
inline Iterator operator++(
    int 
)

function operator->

cpp
inline pointer operator->()
inline pointer operator->()

Protected Functions Documentation

function ForwardIteratorBase

cpp
inline ForwardIteratorBase()
inline ForwardIteratorBase()

function dereference

cpp
inline reference dereference() const
inline reference dereference() const

Return a reference to the current element (reference to a value type, not a pointer).

function equals

cpp
inline bool equals(
    const Iterator & b
) const
inline bool equals(
    const Iterator & b
) const

Determines whether this iterator is pointing to the same element as another one (used by the == operator)

function next

cpp
inline void next()
inline void next()

Advance the iterator.

function ptr

cpp
inline pointer ptr() const
inline pointer ptr() const

Return a raw pointer to the current element.

function self

cpp
inline Iterator * self()
inline Iterator * self()

CRTP self pointer (pointer to the derived type)

function self

cpp
inline const Iterator * self() const
inline const Iterator * self() const

CRTP const self pointer.

function valid

cpp
inline bool valid() const
inline bool valid() const

Check whether the iterator is pointing at a valid element (eg. not the end of a container)

Friends

friend operator!=

cpp
friend bool operator!=(
    const Iterator & a,

    const Iterator & b
);
friend bool operator!=(
    const Iterator & a,

    const Iterator & b
);

friend operator==

cpp
friend bool operator==(
    const Iterator & a,

    const Iterator & b
);
friend bool operator==(
    const Iterator & a,

    const Iterator & b
);

Updated on 2025-05-31 at 12:55:30 +0000