JsonCpp project page Classes Namespace JsonCpp home page

Json::ValueConstIterator Class Reference

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

#include <json/value.h>

Inherits Json::ValueIteratorBase.

Public Types

using value_type = const Value
using reference = const Value&
using pointer = const Value*
using SelfType = ValueConstIterator
Public Types inherited from Json::ValueIteratorBase
using iterator_category = std::bidirectional_iterator_tag
using size_t = unsigned int
using difference_type = int
using SelfType = ValueIteratorBase

Public Member Functions

 ValueConstIterator ()
 ValueConstIterator (ValueIterator const &other)
SelfTypeoperator= (const ValueIteratorBase &other)
SelfType operator++ (int)
SelfType operator-- (int)
SelfTypeoperator-- ()
SelfTypeoperator++ ()
reference operator* () const
pointer operator-> () const
Public Member Functions inherited from Json::ValueIteratorBase
bool operator== (const SelfType &other) const
bool operator!= (const SelfType &other) const
difference_type operator- (const SelfType &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, or -1 if it is not an arrayValue.
String name () const
 Return the member name of the referenced Value, or "" if it is not an objectValue.
 __declspec (deprecated("Use `key = name();` instead.")) char const *memberName() const
 Return the member name of the referenced Value.
char const * memberName (char const **end) const
 Return the member name of the referenced Value, or NULL if it is not an objectValue.
 ValueIteratorBase ()
 ValueIteratorBase (const Value::ObjectValues::iterator &current)

Friends

class Value

Additional Inherited Members

Protected Member Functions inherited from Json::ValueIteratorBase
const Valuederef () const
Valuederef ()
void increment ()
void decrement ()
difference_type computeDistance (const SelfType &other) const
bool isEqual (const SelfType &other) const
void copy (const SelfType &other)

Detailed Description

const iterator for object and array value.

Definition at line 920 of file value.h.

Member Typedef Documentation

◆ pointer

Definition at line 928 of file value.h.

◆ reference

Definition at line 927 of file value.h.

◆ SelfType

◆ value_type

Definition at line 924 of file value.h.

Constructor & Destructor Documentation

◆ ValueConstIterator() [1/2]

Json::ValueConstIterator::ValueConstIterator ( )
default

◆ ValueConstIterator() [2/2]

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

Member Function Documentation

◆ operator*()

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

Definition at line 964 of file value.h.

References Json::ValueIteratorBase::deref().

◆ operator++() [1/2]

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

Definition at line 959 of file value.h.

References Json::ValueIteratorBase::increment().

◆ operator++() [2/2]

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

Definition at line 942 of file value.h.

◆ operator--() [1/2]

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

Definition at line 954 of file value.h.

References Json::ValueIteratorBase::decrement().

◆ operator--() [2/2]

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

Definition at line 948 of file value.h.

◆ operator->()

pointer Json::ValueConstIterator::operator-> ( ) const
inline

Definition at line 966 of file value.h.

References Json::ValueIteratorBase::deref().

◆ operator=()

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

◆ Value

friend class Value
friend

Definition at line 921 of file value.h.

References Value.

Referenced by Value.


The documentation for this class was generated from the following files: