DIWNE::BidirectionalNodeIterator
#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_tag | iterator_category |
| using typename Super::shared_pointer | shared_pointer |
Protected Types
| Name | |
|---|---|
| using ForwardNodeIterator< Iterator, NodeType, IsConst > | Super |
Public Functions
| Name | |
|---|---|
| BidirectionalNodeIterator() | |
| BidirectionalNodeIterator(Super::Container nodes, std::size_t idx) | |
| virtual void | back()<br>Move the iterator to the previous position. |
| Iterator & | operator--() |
| Iterator | operator--(int ) |
| bool | valid() 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) | |
| reference | dereference() const |
| bool | equals(const Iterator & b) const<br>Determines whether this iterator is pointing to the same element as another one (used by the == operator) |
| void | next()<br>Advance the iterator. |
| pointer | ptr() const |
| shared_pointer | sharedPtr() 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_t | difference_type |
| using typename std::conditional< IsConst, const Value *, Value * >::type | pointer |
| using typename std::conditional< IsConst, const Value &, Value & >::type | reference |
| using typename std::conditional< IsConst, const Value, Value >::type | value_type |
Public Functions inherited from DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >
| Name | |
|---|---|
| reference | operator*() |
| Iterator & | operator++() |
| Iterator | operator++(int ) |
| pointer | operator->() |
Protected Functions inherited from DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >
| Name | |
|---|---|
| ForwardIteratorBase() | |
| virtual | ~ForwardIteratorBase() =default |
| reference | dereference() const<br>Return a reference to the current element (reference to a value type, not a pointer). |
| bool | equals(const Iterator & b) const<br>Determines whether this iterator is pointing to the same element as another one (used by the == operator) |
| void | next()<br>Advance the iterator. |
| pointer | ptr() 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 | |
|---|---|
| bool | operator!=(const Iterator & a, const Iterator & b) |
| bool | operator==(const Iterator & a, const Iterator & b) |
Detailed Description
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
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
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
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
inline BidirectionalNodeIterator()inline BidirectionalNodeIterator()function BidirectionalNodeIterator
inline BidirectionalNodeIterator(
Super::Container nodes,
std::size_t idx
)inline BidirectionalNodeIterator(
Super::Container nodes,
std::size_t idx
)function back
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--
inline Iterator & operator--()inline Iterator & operator--()function operator--
inline Iterator operator--(
int
)inline Iterator operator--(
int
)function valid
inline bool valid() constinline bool valid() constUpdated on 2026-05-21 at 15:39:36 +0000