DIWNE::ForwardIteratorBase
#include "DIWNE/Core/diwne_iterators.h"
Inherited by DIWNE::ForwardNodeIterator< NodeIteratorImpl< Node, IsConst >, Node, IsConst >, DIWNE::ForwardNodeIterator< FilteredNodeIterator< Node >, Node, IsConst >, DIWNE::ForwardNodeIterator< FilteredRecursiveNodeIterator< Node >, Node, false >, DIWNE::ForwardNodeIterator< NodeIteratorImpl< NodeType, IsConst >, NodeType, IsConst >, DIWNE::ForwardNodeIterator< RecursiveNodeIterator< Node >, Node, false >
Public Types
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
Name | |
---|---|
reference | operator*() |
Iterator & | operator++() |
Iterator | operator++(int ) |
pointer | operator->() |
Protected Functions
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. |
bool | valid() const<br>Check whether the iterator is pointing at a valid element (eg. not the end of a container) |
Friends
Name | |
---|---|
bool | operator!=(const Iterator & a, const Iterator & b) |
bool | operator==(const Iterator & a, const Iterator & b) |
Detailed Description
template <typename Iterator ,
typename Value ,
bool IsConst>
class DIWNE::ForwardIteratorBase;
template <typename Iterator ,
typename Value ,
bool IsConst>
class DIWNE::ForwardIteratorBase;
Public Types Documentation
using difference_type
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::difference_type = std::ptrdiff_t;
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::difference_type = std::ptrdiff_t;
using iterator_category
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::iterator_category = std::forward_iterator_tag;
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::iterator_category = std::forward_iterator_tag;
using pointer
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::pointer = typename std::conditional<IsConst, const Value*, Value*>::type;
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::pointer = typename std::conditional<IsConst, const Value*, Value*>::type;
using reference
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::reference = typename std::conditional<IsConst, const Value&, Value&>::type;
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::reference = typename std::conditional<IsConst, const Value&, Value&>::type;
using value_type
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::value_type = typename std::conditional<IsConst, const Value, Value>::type;
using DIWNE::ForwardIteratorBase< Iterator, Value, IsConst >::value_type = typename std::conditional<IsConst, const Value, Value>::type;
Public Functions Documentation
function operator*
inline reference operator*()
inline reference operator*()
function operator++
inline Iterator & operator++()
inline Iterator & operator++()
function operator++
inline Iterator operator++(
int
)
inline Iterator operator++(
int
)
function operator->
inline pointer operator->()
inline pointer operator->()
Protected Functions Documentation
function ForwardIteratorBase
inline ForwardIteratorBase()
inline ForwardIteratorBase()
function ~ForwardIteratorBase
virtual ~ForwardIteratorBase() =default
virtual ~ForwardIteratorBase() =default
function dereference
inline reference dereference() const
inline reference dereference() const
Return a reference to the current element (reference to a value type, not a pointer).
function equals
inline bool equals(
const Iterator & b
) const
inline bool equals(
const Iterator & b
) const
Determines whether this iterator is pointing to the same element as another one (used by the == operator)
function next
inline void next()
inline void next()
Advance the iterator.
function ptr
inline pointer ptr() const
inline pointer ptr() const
Return a raw pointer to the current element.
function self
inline Iterator * self()
inline Iterator * self()
CRTP self pointer (pointer to the derived type)
function self
inline const Iterator * self() const
inline const Iterator * self() const
CRTP const self pointer.
function sharedPtr
inline std::shared_ptr< Value > sharedPtr() const
inline std::shared_ptr< Value > sharedPtr() const
Return the owning pointer to the current element. Creates a new shared pointer object.
function valid
inline bool valid() const
inline bool valid() const
Check whether the iterator is pointing at a valid element (eg. not the end of a container)
Friends
friend operator!=
friend bool operator!=(
const Iterator & a,
const Iterator & b
);
friend bool operator!=(
const Iterator & a,
const Iterator & b
);
friend operator==
friend bool operator==(
const Iterator & a,
const Iterator & b
);
friend bool operator==(
const Iterator & a,
const Iterator & b
);
Updated on 2025-05-31 at 12:55:31 +0000