Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::config::ArrayView::ArrayIterator< T > Struct Template Reference

Custom iterator class which contains config object or value underneath ArrayView. More...

#include <ArrayView.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
 
using pointer = T const*
 
using reference = T const&
 
using value_type = T
 

Public Member Functions

 ArrayIterator (ArrayView const &arr, std::size_t index)
 Constructs an ArrayIterator with underlying ArrayView and index value.
 
ArrayIteratoroperator++ ()
 Prefix increment operator.
 
ArrayIterator operator++ (int)
 Postfix increment operator.
 
operator* ()
 Dereference operator to get a ValueView or ObjectView.
 
bool operator== (ArrayIterator const &other) const
 Equality operator.
 
bool operator!= (ArrayIterator const &other) const
 Inequality operator.
 

Detailed Description

template<typename T>
struct util::config::ArrayView::ArrayIterator< T >

Custom iterator class which contains config object or value underneath ArrayView.

Constructor & Destructor Documentation

◆ ArrayIterator()

template<typename T >
util::config::ArrayView::ArrayIterator< T >::ArrayIterator ( ArrayView const & arr,
std::size_t index )
inline

Constructs an ArrayIterator with underlying ArrayView and index value.

Parameters
arrArrayView to iterate
indexCurrent index of the ArrayView

Member Function Documentation

◆ operator!=()

template<typename T >
bool util::config::ArrayView::ArrayIterator< T >::operator!= ( ArrayIterator< T > const & other) const
inline

Inequality operator.

Parameters
otherAnother ArrayIterator to compare
Returns
true if iterators are not equal, otherwise false

◆ operator*()

template<typename T >
T util::config::ArrayView::ArrayIterator< T >::operator* ( )
inline

Dereference operator to get a ValueView or ObjectView.

Returns
ValueView of the ConfigValue

◆ operator++() [1/2]

template<typename T >
ArrayIterator & util::config::ArrayView::ArrayIterator< T >::operator++ ( )
inline

Prefix increment operator.

Returns
Reference to the incremented ArrayIterator

◆ operator++() [2/2]

template<typename T >
ArrayIterator util::config::ArrayView::ArrayIterator< T >::operator++ ( int )
inline

Postfix increment operator.

Returns
Copy of the ArrayIterator before increment

◆ operator==()

template<typename T >
bool util::config::ArrayView::ArrayIterator< T >::operator== ( ArrayIterator< T > const & other) const
inline

Equality operator.

Parameters
otherAnother ArrayIterator to compare
Returns
true if iterators are pointing to the same element in the same ArrayView object, otherwise false

The documentation for this struct was generated from the following file: