DIWNE::NodeRangeBase
Base type for the NodeRange objects, it uses CRTP static polymorphism to avoid code duplication in node range implementations. More...
#include "DIWNE/Core/diwne_iterators.h"
Inherited by DIWNE::FilteredNodeRangeImpl< FilteredNodeRange< Node >, FilteredNodeIterator< Node >, Node, false >, DIWNE::FilteredNodeRangeImpl< FilteredRecursiveNodeRange< Node >, FilteredRecursiveNodeIterator< Node >, Node, IsConst >, DIWNE::NodeRangeImpl< ConstNodeRange< Node >, ConstNodeIterator< Node >, Node, true >, DIWNE::NodeRangeImpl< NodeRange< NodeType >, NodeIterator< NodeType >, NodeType, false >, DIWNE::NodeRangeImpl< RecursiveNodeRange< Node >, RecursiveNodeIterator< Node >, Node, false >, DIWNE::FilteredNodeRangeImpl< Range, Iterator, NodeType, IsConst >, DIWNE::NodeRangeImpl< Range, Iterator, NodeType, IsConst >
Public Types
Name | |
---|---|
using typename Iterator::Container | Container |
Public Functions
Name | |
---|---|
Iterator | begin()<br>Get a node iterator pointing to the beginning of this node range. |
std::vector< std::shared_ptr< NodeType > > | collect()<br>Collect all elements in the range and return them as a std::vector of owning shared pointers. |
std::vector< NodeType * > | collectRaw()<br>Collect all elements in the range and return them as a std::vector of non-owning raw pointers. |
Iterator | end()<br>Get a node iterator pointing to an element following the last element of this node range. |
Protected Functions
Name | |
---|---|
NodeRangeBase(Container nodes) | |
Range * | self()<br>CRTP self pointer (pointer to the derived type) |
Protected Attributes
Name | |
---|---|
Container | _nodes |
Detailed Description
template <typename Range ,
typename Iterator ,
typename NodeType ,
bool IsConst>
class DIWNE::NodeRangeBase;
template <typename Range ,
typename Iterator ,
typename NodeType ,
bool IsConst>
class DIWNE::NodeRangeBase;
Base type for the NodeRange objects, it uses CRTP static polymorphism to avoid code duplication in node range implementations.
Template Parameters:
- Range CRTP derived range type
- Iterator The range iterator
- IsConst Whether the range is const or not
Public Types Documentation
using Container
using DIWNE::NodeRangeBase< Range, Iterator, NodeType, IsConst >::Container = typename Iterator::Container;
using DIWNE::NodeRangeBase< Range, Iterator, NodeType, IsConst >::Container = typename Iterator::Container;
Public Functions Documentation
function begin
inline Iterator begin()
inline Iterator begin()
Get a node iterator pointing to the beginning of this node range.
function collect
inline std::vector< std::shared_ptr< NodeType > > collect()
inline std::vector< std::shared_ptr< NodeType > > collect()
Collect all elements in the range and return them as a std::vector of owning shared pointers.
See: collectRaw()
This operation iterates over the underlying node iterator and collects all it's elements.
function collectRaw
inline std::vector< NodeType * > collectRaw()
inline std::vector< NodeType * > collectRaw()
Collect all elements in the range and return them as a std::vector of non-owning raw pointers.
See: collect()
This operation iterates over the underlying node iterator and collects all it's elements.
function end
inline Iterator end()
inline Iterator end()
Get a node iterator pointing to an element following the last element of this node range.
Protected Functions Documentation
function NodeRangeBase
inline NodeRangeBase(
Container nodes
)
inline NodeRangeBase(
Container nodes
)
function self
inline Range * self()
inline Range * self()
CRTP self pointer (pointer to the derived type)
Protected Attributes Documentation
variable _nodes
Container _nodes;
Container _nodes;
Updated on 2025-05-31 at 12:55:31 +0000