rippled
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Json::ValueConstIterator Class Reference

const iterator for object and array value. More...

#include <json_value.h>

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

Public Types

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

Public Member Functions

 ValueConstIterator ()=default
 
SelfTypeoperator= (ValueIteratorBase const &other)
 
SelfType operator++ (int)
 
SelfType operator-- (int)
 
SelfTypeoperator-- ()
 
SelfTypeoperator++ ()
 
reference operator* () const
 
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 arrayValue.
 
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 Member Functions

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

Private Attributes

Value::ObjectValues::iterator current_
 
bool isNull_
 

Friends

class Value
 

Detailed Description

const iterator for object and array value.

Definition at line 572 of file json_value.h.

Member Typedef Documentation

◆ size_t

using Json::ValueConstIterator::size_t = unsigned int

Definition at line 577 of file json_value.h.

◆ difference_type

Definition at line 578 of file json_value.h.

◆ reference

Definition at line 579 of file json_value.h.

◆ pointer

Definition at line 580 of file json_value.h.

◆ SelfType

Definition at line 581 of file json_value.h.

Constructor & Destructor Documentation

◆ ValueConstIterator() [1/2]

Json::ValueConstIterator::ValueConstIterator ( )
default

◆ ValueConstIterator() [2/2]

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

Definition at line 150 of file json_valueiterator.cpp.

Member Function Documentation

◆ operator=()

ValueConstIterator & Json::ValueConstIterator::operator= ( ValueIteratorBase const &  other)

Definition at line 157 of file json_valueiterator.cpp.

◆ operator++() [1/2]

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

Definition at line 595 of file json_value.h.

◆ operator--() [1/2]

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

Definition at line 603 of file json_value.h.

◆ operator--() [2/2]

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

Definition at line 611 of file json_value.h.

◆ operator++() [2/2]

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

Definition at line 618 of file json_value.h.

◆ operator*()

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

Definition at line 625 of file json_value.h.

◆ operator==()

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

Definition at line 519 of file json_value.h.

◆ operator!=()

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

Definition at line 525 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 109 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 125 of file json_valueiterator.cpp.

◆ memberName()

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

Return the member name of the referenced Value.

"" if it is not an objectValue.

Definition at line 136 of file json_valueiterator.cpp.

◆ deref()

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

Definition at line 46 of file json_valueiterator.cpp.

◆ increment()

void Json::ValueIteratorBase::increment ( )
protectedinherited

Definition at line 52 of file json_valueiterator.cpp.

◆ decrement()

void Json::ValueIteratorBase::decrement ( )
protectedinherited

Definition at line 58 of file json_valueiterator.cpp.

◆ computeDistance()

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

Definition at line 64 of file json_valueiterator.cpp.

◆ isEqual()

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

Definition at line 92 of file json_valueiterator.cpp.

◆ copy()

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

Definition at line 103 of file json_valueiterator.cpp.

Friends And Related Symbol Documentation

◆ Value

friend class Value
friend

Definition at line 574 of file json_value.h.

Member Data Documentation

◆ current_

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

Definition at line 564 of file json_value.h.

◆ isNull_

bool Json::ValueIteratorBase::isNull_
privateinherited

Definition at line 566 of file json_value.h.