DIWNE::RecursiveNodeIteratorImpl
CRTP templated implementation class of the RecursiveNodeIterator. More...
#include "DIWNE/Core/diwne_iterators.h"
Inherits from DIWNE::ForwardNodeIterator< Iterator, NodeType, false >, DIWNE::ForwardIteratorBase< Iterator, NodeType, IsConst >
Inherited by DIWNE::FilteredRecursiveNodeIterator< NodeType >, DIWNE::RecursiveNodeIterator< NodeType >
Public Types
| Name | |
|---|---|
| using typename Super::shared_pointer | shared_pointer |
Protected Types
| Name | |
|---|---|
| using NodeIterator<> | ChildNodeIterator |
| using NodeRange<> | ChildNodeRange |
| using bool(*)(const Node *) | Predicate |
| using ForwardNodeIterator< Iterator, NodeType, false > | Super |
Public Functions
| Name | |
|---|---|
| RecursiveNodeIteratorImpl() | |
| RecursiveNodeIteratorImpl(Predicate divePredicate, typename Super::Container nodes, std::size_t idx) | |
| RecursiveNodeIteratorImpl(typename Super::Container nodes, std::size_t idx) | |
| Node * | basePtr()<br>Returns the base Node* pointer that isn't casted to the derived NodeType. |
| reference | dereference() const |
| bool | equals(const Iterator & b) const |
| void | next() |
| pointer | ptr() const |
| shared_pointer | sharedPtr() const |
Protected Attributes
| Name | |
|---|---|
| Predicate | _divePredicate <br>Dive predicate, an additional condition required to consider diving inside node's children. |
| std::stack< ChildNodeIterator, std::vector< ChildNodeIterator > > | _stack <br>A stack of child container node iterators, they store their own position at each depth level. |
Additional inherited members
Public Types inherited from DIWNE::ForwardNodeIterator< Iterator, NodeType, false >
| Name | |
|---|---|
| using const NodeList * | Container |
Public Functions inherited from DIWNE::ForwardNodeIterator< Iterator, NodeType, false >
| Name | |
|---|---|
| ForwardNodeIterator() | |
| ForwardNodeIterator(Container nodes, std::size_t idx) | |
| bool | valid() 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, false >
| 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 std::forward_iterator_tag | iterator_category |
| 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 |
| Iterator * | self()<br>CRTP self pointer (pointer to the derived type) |
| const Iterator * | self() const<br>CRTP const self pointer. |
| bool | valid() 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 | |
|---|---|
| bool | operator!=(const Iterator & a, const Iterator & b) |
| bool | operator==(const Iterator & a, const Iterator & b) |
Detailed Description
template <typename Iterator ,
typename NodeType >
class DIWNE::RecursiveNodeIteratorImpl;template <typename Iterator ,
typename NodeType >
class DIWNE::RecursiveNodeIteratorImpl;CRTP templated implementation class of the RecursiveNodeIterator.
Public Types Documentation
using shared_pointer
using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::shared_pointer = typename Super::shared_pointer;using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::shared_pointer = typename Super::shared_pointer;Protected Types Documentation
using ChildNodeIterator
using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::ChildNodeIterator = NodeIterator<>;using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::ChildNodeIterator = NodeIterator<>;using ChildNodeRange
using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::ChildNodeRange = NodeRange<>;using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::ChildNodeRange = NodeRange<>;using Predicate
using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::Predicate = bool (*)(const Node*);using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::Predicate = bool (*)(const Node*);using Super
using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::Super = ForwardNodeIterator<Iterator, NodeType, false>;using DIWNE::RecursiveNodeIteratorImpl< Iterator, NodeType >::Super = ForwardNodeIterator<Iterator, NodeType, false>;Public Functions Documentation
function RecursiveNodeIteratorImpl
inline RecursiveNodeIteratorImpl()inline RecursiveNodeIteratorImpl()function RecursiveNodeIteratorImpl
inline RecursiveNodeIteratorImpl(
Predicate divePredicate,
typename Super::Container nodes,
std::size_t idx
)inline RecursiveNodeIteratorImpl(
Predicate divePredicate,
typename Super::Container nodes,
std::size_t idx
)function RecursiveNodeIteratorImpl
inline RecursiveNodeIteratorImpl(
typename Super::Container nodes,
std::size_t idx
)inline RecursiveNodeIteratorImpl(
typename Super::Container nodes,
std::size_t idx
)function basePtr
inline Node * basePtr()inline Node * basePtr()Returns the base Node* pointer that isn't casted to the derived NodeType.
function dereference
inline reference dereference() constinline reference dereference() constfunction equals
inline bool equals(
const Iterator & b
) constinline bool equals(
const Iterator & b
) constfunction next
void next()void next()function ptr
inline pointer ptr() constinline pointer ptr() constfunction sharedPtr
inline shared_pointer sharedPtr() constinline shared_pointer sharedPtr() constProtected Attributes Documentation
variable _divePredicate
Predicate _divePredicate {nullptr};Predicate _divePredicate {nullptr};Dive predicate, an additional condition required to consider diving inside node's children.
variable _stack
std::stack< ChildNodeIterator, std::vector< ChildNodeIterator > > _stack;std::stack< ChildNodeIterator, std::vector< ChildNodeIterator > > _stack;A stack of child container node iterators, they store their own position at each depth level.
Updated on 2026-05-21 at 15:39:36 +0000