LibraryLink Utilities  3.0.1
Modern C++ wrapper over LibraryLink and WSTP
LLU::NodeNameIterator Struct Reference

Description

Simple proxy input iterator that goes over a DataStore and returns node names when dereferenced.

Template Parameters
T- data node type, see LLU::NodeType namespace for supported node types

Inherits LLU::Detail::DataListIteratorPrimitive.

#include <DataList.hpp>

Public Types

using value_type = std::string_view
 This iterator iterates over node names which are represented by std::string_view. More...
 
using reference = value_type
 NodeIterator is a proxy iterator and so the reference type is the same as value_type. More...
 
using iterator_category = std::input_iterator_tag
 
using pointer = void *
 
using difference_type = mint
 

Public Member Functions

template<typename T >
 NodeNameIterator (const NodeIterator< T > &it)
 Create NodeNameIterator pointing to the same node as given NodeIterator<T> More...
 
reference operator* () const
 Get name of the currently pointed to node. More...
 
NodeNameIteratoroperator++ ()
 Pre-increment operator. More...
 
NodeNameIterator operator++ (int)
 Post-increment operator. More...
 

Public Attributes

GenericDataNode node
 

Type aliases documentation

◆ reference

NodeIterator is a proxy iterator and so the reference type is the same as value_type.

◆ value_type

using LLU::NodeNameIterator::value_type = std::string_view

This iterator iterates over node names which are represented by std::string_view.

Constructor & Destructor Documentation

◆ NodeNameIterator()

template<typename T >
LLU::NodeNameIterator::NodeNameIterator ( const NodeIterator< T > &  it)
inlineexplicit

Create NodeNameIterator pointing to the same node as given NodeIterator<T>

Template Parameters
T- any type. It will be discarded as node names are always strings
Parameters
it- NodeIterator<T> from which a new NodeNameIterator will be created

Member Function Documentation

◆ operator*()

reference LLU::NodeNameIterator::operator* ( ) const
inline

Get name of the currently pointed to node.

Returns
proxy object with the name of the currently pointed to node

◆ operator++() [1/2]

NodeNameIterator& LLU::NodeNameIterator::operator++ ( )
inline

Pre-increment operator.

Returns
this

◆ operator++() [2/2]

NodeNameIterator LLU::NodeNameIterator::operator++ ( int  )
inline

Post-increment operator.

Returns
"old" copy of the iterator object