Skip to content

DIWNE::NodeIteratorImpl

More...

#include "DIWNE/Core/diwne_iterators.h"

Inherits from DIWNE::BidirectionalNodeIterator< NodeIteratorImpl< NodeType, IsConst >, NodeType, IsConst >, DIWNE::ForwardNodeIterator< Iterator, NodeType, IsConst >, DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >

Inherited by DIWNE::ConstNodeIterator< NodeType >, DIWNE::NodeIterator< NodeType >

Public Types

Name
using std::random_access_iterator_tagiterator_category
using typename Super::shared_pointershared_pointer

Protected Types

Name
using NodeIteratorImpl< NodeType, IsConst >Iterator
using BidirectionalNodeIterator< NodeIteratorImpl< NodeType, IsConst >, NodeType, IsConst >Super

Public Functions

Name
NodeIteratorImpl()
NodeIteratorImpl(typename Super::Container nodes, std::size_t idx)
Iteratoroperator+(difference_type rhs) const
Iterator &operator+=(difference_type rhs)
Iteratoroperator-(difference_type rhs) const
Iterator &operator-=(difference_type rhs)
booloperator<(const Iterator & rhs) const
booloperator<=(const Iterator & rhs) const
booloperator>(const Iterator & rhs) const
booloperator>=(const Iterator & rhs) const
referenceoperator[](difference_type idx) const

Additional inherited members

Public Functions inherited from DIWNE::BidirectionalNodeIterator< NodeIteratorImpl< NodeType, IsConst >, NodeType, IsConst >

Name
BidirectionalNodeIterator()
BidirectionalNodeIterator(Super::Container nodes, std::size_t idx)
virtual voidback()<br>Move the iterator to the previous position.
Iterator &operator--()
Iteratoroperator--(int )
boolvalid() const

Public Types inherited from DIWNE::ForwardNodeIterator< Iterator, NodeType, IsConst >

Name
using const NodeList *Container

Public Functions inherited from DIWNE::ForwardNodeIterator< Iterator, NodeType, IsConst >

Name
ForwardNodeIterator()
ForwardNodeIterator(Container nodes, std::size_t idx)
referencedereference() const
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
shared_pointersharedPtr() const
boolvalid() const<br>Check whether the iterator is pointing at a valid element (eg. not the end of a container)

Protected Attributes inherited from DIWNE::ForwardNodeIterator< Iterator, NodeType, IsConst >

Name
std::size_t_idx <br>Current node index // TODO: Should probably be an int.
Container_nodes <br>Reference to the node list.

Public Types inherited from DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >

Name
using std::ptrdiff_tdifference_type
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 inherited from DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >

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

Protected Functions inherited from DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >

Name
ForwardIteratorBase()
virtual~ForwardIteratorBase() =default
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.
std::shared_ptr< Value >sharedPtr() const<br>Return the owning pointer to the current element. Creates a new shared pointer object.
boolvalid() const<br>Check whether the iterator is pointing at a valid element (eg. not the end of a container)

Friends inherited from DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >

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

Detailed Description

cpp
template <typename NodeType ,
bool IsConst>
class DIWNE::NodeIteratorImpl;
template <typename NodeType ,
bool IsConst>
class DIWNE::NodeIteratorImpl;

Public Types Documentation

using iterator_category

cpp
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::iterator_category =  std::random_access_iterator_tag;
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::iterator_category =  std::random_access_iterator_tag;

using shared_pointer

cpp
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::shared_pointer =  typename Super::shared_pointer;
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::shared_pointer =  typename Super::shared_pointer;

Protected Types Documentation

using Iterator

cpp
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::Iterator =  NodeIteratorImpl<NodeType, IsConst>;
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::Iterator =  NodeIteratorImpl<NodeType, IsConst>;

using Super

cpp
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::Super =  BidirectionalNodeIterator<NodeIteratorImpl<NodeType, IsConst>, NodeType, IsConst>;
using DIWNE::NodeIteratorImpl< NodeType, IsConst >::Super =  BidirectionalNodeIterator<NodeIteratorImpl<NodeType, IsConst>, NodeType, IsConst>;

Public Functions Documentation

function NodeIteratorImpl

cpp
inline NodeIteratorImpl()
inline NodeIteratorImpl()

function NodeIteratorImpl

cpp
inline NodeIteratorImpl(
    typename Super::Container nodes,
    std::size_t idx
)
inline NodeIteratorImpl(
    typename Super::Container nodes,
    std::size_t idx
)

function operator+

cpp
inline Iterator operator+(
    difference_type rhs
) const
inline Iterator operator+(
    difference_type rhs
) const

function operator+=

cpp
inline Iterator & operator+=(
    difference_type rhs
)
inline Iterator & operator+=(
    difference_type rhs
)

function operator-

cpp
inline Iterator operator-(
    difference_type rhs
) const
inline Iterator operator-(
    difference_type rhs
) const

function operator-=

cpp
inline Iterator & operator-=(
    difference_type rhs
)
inline Iterator & operator-=(
    difference_type rhs
)

function operator<

cpp
inline bool operator<(
    const Iterator & rhs
) const
inline bool operator<(
    const Iterator & rhs
) const

function operator<=

cpp
inline bool operator<=(
    const Iterator & rhs
) const
inline bool operator<=(
    const Iterator & rhs
) const

function operator>

cpp
inline bool operator>(
    const Iterator & rhs
) const
inline bool operator>(
    const Iterator & rhs
) const

function operator>=

cpp
inline bool operator>=(
    const Iterator & rhs
) const
inline bool operator>=(
    const Iterator & rhs
) const

function operator[]

cpp
inline reference operator[](
    difference_type idx
) const
inline reference operator[](
    difference_type idx
) const

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