rippled
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Json::ValueIterator Class Reference

Iterator for object and array value. More...

Inheritance diagram for Json::ValueIterator:
Inheritance graph
[legend]
Collaboration diagram for Json::ValueIterator:
Collaboration graph
[legend]

Public Types

using size_t = unsigned int
 
using difference_type = int
 
using reference = Value &
 
using pointer = Value *
 
using SelfType = ValueIterator
 

Public Member Functions

 ValueIterator ()=default
 
 ValueIterator (const ValueConstIterator &other)
 
 ValueIterator (const ValueIterator &other)
 
SelfTypeoperator= (const SelfType &other)
 
SelfType operator++ (int)
 
SelfType operator-- (int)
 
SelfTypeoperator-- ()
 
SelfTypeoperator++ ()
 
reference operator* () const
 
bool operator== (const SelfType &other) const
 
bool operator!= (const SelfType &other) const
 
Value key () const
 Return either the index or the member name of the referenced value as a Value. More...
 
UInt index () const
 Return the index of the referenced Value. -1 if it is not an arrayValue. More...
 
const char * memberName () const
 Return the member name of the referenced Value. More...
 

Protected Member Functions

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

Private Member Functions

 ValueIterator (const Value::ObjectValues::iterator &current)
 

Private Attributes

Value::ObjectValues::iterator current_
 
bool isNull_
 

Friends

class Value
 

Detailed Description

Iterator for object and array value.

Definition at line 620 of file json_value.h.

Member Typedef Documentation

◆ size_t

using Json::ValueIterator::size_t = unsigned int

Definition at line 625 of file json_value.h.

◆ difference_type

Definition at line 626 of file json_value.h.

◆ reference

Definition at line 627 of file json_value.h.

◆ pointer

Definition at line 628 of file json_value.h.

◆ SelfType

Definition at line 629 of file json_value.h.

Constructor & Destructor Documentation

◆ ValueIterator() [1/4]

Json::ValueIterator::ValueIterator ( )
default

◆ ValueIterator() [2/4]

Json::ValueIterator::ValueIterator ( const ValueConstIterator other)

Definition at line 175 of file json_valueiterator.cpp.

◆ ValueIterator() [3/4]

Json::ValueIterator::ValueIterator ( const ValueIterator other)

Definition at line 180 of file json_valueiterator.cpp.

◆ ValueIterator() [4/4]

Json::ValueIterator::ValueIterator ( const Value::ObjectValues::iterator &  current)
explicitprivate

Definition at line 170 of file json_valueiterator.cpp.

Member Function Documentation

◆ operator=()

ValueIterator & Json::ValueIterator::operator= ( const SelfType other)

Definition at line 186 of file json_valueiterator.cpp.

◆ operator++() [1/2]

SelfType Json::ValueIterator::operator++ ( int  )

Definition at line 645 of file json_value.h.

◆ operator--() [1/2]

SelfType Json::ValueIterator::operator-- ( int  )

Definition at line 653 of file json_value.h.

◆ operator--() [2/2]

SelfType& Json::ValueIterator::operator-- ( )

Definition at line 661 of file json_value.h.

◆ operator++() [2/2]

SelfType& Json::ValueIterator::operator++ ( )

Definition at line 668 of file json_value.h.

◆ operator*()

reference Json::ValueIterator::operator* ( ) const

Definition at line 675 of file json_value.h.

◆ operator==()

bool Json::ValueIteratorBase::operator== ( const SelfType other) const
inherited

Definition at line 506 of file json_value.h.

◆ operator!=()

bool Json::ValueIteratorBase::operator!= ( const SelfType other) const
inherited

Definition at line 512 of file json_value.h.

◆ key()

Value Json::ValueIteratorBase::key ( ) const
inherited

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

Definition at line 108 of file json_valueiterator.cpp.

◆ index()

UInt Json::ValueIteratorBase::index ( ) const
inherited

Return the index of the referenced Value. -1 if it is not an arrayValue.

Definition at line 124 of file json_valueiterator.cpp.

◆ memberName()

const char * Json::ValueIteratorBase::memberName ( ) const
inherited

Return the member name of the referenced Value.

"" if it is not an objectValue.

Definition at line 135 of file json_valueiterator.cpp.

◆ deref()

Value & Json::ValueIteratorBase::deref ( ) const
protectedinherited

Definition at line 45 of file json_valueiterator.cpp.

◆ increment()

void Json::ValueIteratorBase::increment ( )
protectedinherited

Definition at line 51 of file json_valueiterator.cpp.

◆ decrement()

void Json::ValueIteratorBase::decrement ( )
protectedinherited

Definition at line 57 of file json_valueiterator.cpp.

◆ computeDistance()

ValueIteratorBase::difference_type Json::ValueIteratorBase::computeDistance ( const SelfType other) const
protectedinherited

Definition at line 63 of file json_valueiterator.cpp.

◆ isEqual()

bool Json::ValueIteratorBase::isEqual ( const SelfType other) const
protectedinherited

Definition at line 91 of file json_valueiterator.cpp.

◆ copy()

void Json::ValueIteratorBase::copy ( const SelfType other)
protectedinherited

Definition at line 102 of file json_valueiterator.cpp.

Friends And Related Function Documentation

◆ Value

friend class Value
friend

Definition at line 622 of file json_value.h.

Member Data Documentation

◆ current_

Value::ObjectValues::iterator Json::ValueIteratorBase::current_
privateinherited

Definition at line 551 of file json_value.h.

◆ isNull_

bool Json::ValueIteratorBase::isNull_
privateinherited

Definition at line 553 of file json_value.h.