Skip to content

DIWNE::BidirectionalNodeIterator

More...

#include "DIWNE/Core/diwne_iterators.h"

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

Inherited by DIWNE::FilteredNodeIteratorImpl< FilteredNodeIterator< Node >, Node, false >, DIWNE::NodeIteratorImpl< Node, true >, DIWNE::NodeIteratorImpl< Node, false >, DIWNE::FilteredNodeIteratorImpl< Iterator, NodeType, IsConst >

Public Types

Name
using std::bidirectional_iterator_tagiterator_category
using typename Super::shared_pointershared_pointer

Protected Types

Name
using ForwardNodeIterator< Iterator, NodeType, IsConst >Super

Public Functions

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

Additional inherited members

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

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.

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 Iterator ,
typename NodeType ,
bool IsConst>
class DIWNE::BidirectionalNodeIterator;
template <typename Iterator ,
typename NodeType ,
bool IsConst>
class DIWNE::BidirectionalNodeIterator;

Public Types Documentation

using iterator_category

cpp
using DIWNE::BidirectionalNodeIterator< Iterator, NodeType, IsConst >::iterator_category =  std::bidirectional_iterator_tag;
using DIWNE::BidirectionalNodeIterator< Iterator, NodeType, IsConst >::iterator_category =  std::bidirectional_iterator_tag;

using shared_pointer

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

Protected Types Documentation

using Super

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

Public Functions Documentation

function BidirectionalNodeIterator

cpp
inline BidirectionalNodeIterator()
inline BidirectionalNodeIterator()

function BidirectionalNodeIterator

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

function back

cpp
inline virtual void back()
inline virtual void back()

Move the iterator to the previous position.

Reimplemented by: DIWNE::FilteredNodeIteratorImpl::back, DIWNE::FilteredNodeIteratorImpl::back

function operator--

cpp
inline Iterator & operator--()
inline Iterator & operator--()

function operator--

cpp
inline Iterator operator--(
    int 
)
inline Iterator operator--(
    int 
)

function valid

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

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