xrpld
Loading...
Searching...
No Matches
json::ValueIteratorBase Class Reference

base class for Value iterators. More...

#include <json_value.h>

Inheritance diagram for json::ValueIteratorBase:
Collaboration diagram for json::ValueIteratorBase:

Public Types

using size_t = unsigned int
using difference_type = int
using SelfType = ValueIteratorBase

Public Member Functions

 ValueIteratorBase ()
 ValueIteratorBase (Value::ObjectValues::iterator const &current)
bool operator== (SelfType const &other) const
bool operator!= (SelfType const &other) const
Value key () const
 Return either the index or the member name of the referenced value as a Value.
UInt index () const
 Return the index of the referenced Value. -1 if it is not an ValueType::Array.
char const * memberName () const
 Return the member name of the referenced Value.

Protected Member Functions

Valuederef () const
void increment ()
void decrement ()
difference_type computeDistance (SelfType const &other) const
bool isEqual (SelfType const &other) const
void copy (SelfType const &other)

Private Attributes

Value::ObjectValues::iterator current_
bool isNull_

Detailed Description

base class for Value iterators.

Definition at line 492 of file json_value.h.

Member Typedef Documentation

◆ size_t

using json::ValueIteratorBase::size_t = unsigned int

Definition at line 495 of file json_value.h.

◆ difference_type

Definition at line 496 of file json_value.h.

◆ SelfType

Constructor & Destructor Documentation

◆ ValueIteratorBase() [1/2]

json::ValueIteratorBase::ValueIteratorBase ( )

Definition at line 16 of file json_valueiterator.cpp.

◆ ValueIteratorBase() [2/2]

json::ValueIteratorBase::ValueIteratorBase ( Value::ObjectValues::iterator const & current)
explicit

Definition at line 20 of file json_valueiterator.cpp.

Member Function Documentation

◆ operator==()

bool json::ValueIteratorBase::operator== ( SelfType const & other) const

Definition at line 504 of file json_value.h.

◆ operator!=()

bool json::ValueIteratorBase::operator!= ( SelfType const & other) const

Definition at line 510 of file json_value.h.

◆ key()

Value json::ValueIteratorBase::key ( ) const
nodiscard

Return either the index or the member name of the referenced value as a Value.

Definition at line 88 of file json_valueiterator.cpp.

◆ index()

UInt json::ValueIteratorBase::index ( ) const
nodiscard

Return the index of the referenced Value. -1 if it is not an ValueType::Array.

Definition at line 104 of file json_valueiterator.cpp.

◆ memberName()

char const * json::ValueIteratorBase::memberName ( ) const
nodiscard

Return the member name of the referenced Value.

"" if it is not an ValueType::Object.

Definition at line 115 of file json_valueiterator.cpp.

◆ deref()

Value & json::ValueIteratorBase::deref ( ) const
nodiscardprotected

Definition at line 26 of file json_valueiterator.cpp.

◆ increment()

void json::ValueIteratorBase::increment ( )
protected

Definition at line 32 of file json_valueiterator.cpp.

◆ decrement()

void json::ValueIteratorBase::decrement ( )
protected

Definition at line 38 of file json_valueiterator.cpp.

◆ computeDistance()

ValueIteratorBase::difference_type json::ValueIteratorBase::computeDistance ( SelfType const & other) const
nodiscardprotected

Definition at line 44 of file json_valueiterator.cpp.

◆ isEqual()

bool json::ValueIteratorBase::isEqual ( SelfType const & other) const
nodiscardprotected

Definition at line 71 of file json_valueiterator.cpp.

◆ copy()

void json::ValueIteratorBase::copy ( SelfType const & other)
protected

Definition at line 82 of file json_valueiterator.cpp.

Member Data Documentation

◆ current_

Value::ObjectValues::iterator json::ValueIteratorBase::current_
private

Definition at line 549 of file json_value.h.

◆ isNull_

bool json::ValueIteratorBase::isNull_
private

Definition at line 551 of file json_value.h.