JsonCpp project page JsonCpp home page

Public Types | Public Member Functions | Protected Member Functions | List of all members
Json::ValueIteratorBase Class Reference

base class for Value iterators. More...

#include <json/value.h>

Inherited by Json::ValueConstIterator, and Json::ValueIterator.

Public Types

typedef std::bidirectional_iterator_tag iterator_category
 
typedef unsigned int size_t
 
typedef int difference_type
 
typedef ValueIteratorBase SelfType
 

Public Member Functions

 ValueIteratorBase ()
 
 ValueIteratorBase (const ValueInternalArray::IteratorState &state)
 
 ValueIteratorBase (const ValueInternalMap::IteratorState &state)
 
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. 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)
 

Detailed Description

base class for Value iterators.

Definition at line 908 of file value.h.

Member Typedef Documentation

◆ difference_type

Definition at line 912 of file value.h.

◆ iterator_category

typedef std::bidirectional_iterator_tag Json::ValueIteratorBase::iterator_category

Definition at line 910 of file value.h.

◆ SelfType

Definition at line 913 of file value.h.

◆ size_t

typedef unsigned int Json::ValueIteratorBase::size_t

Definition at line 911 of file value.h.

Constructor & Destructor Documentation

◆ ValueIteratorBase() [1/3]

Json::ValueIteratorBase::ValueIteratorBase ( )

Definition at line 18 of file json_valueiterator.inl.

◆ ValueIteratorBase() [2/3]

Json::ValueIteratorBase::ValueIteratorBase ( const ValueInternalArray::IteratorState &  state)

Definition at line 40 of file json_valueiterator.inl.

◆ ValueIteratorBase() [3/3]

Json::ValueIteratorBase::ValueIteratorBase ( const ValueInternalMap::IteratorState &  state)

Definition at line 47 of file json_valueiterator.inl.

Member Function Documentation

◆ computeDistance()

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

Definition at line 94 of file json_valueiterator.inl.

References array_, and map_.

◆ copy()

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

Definition at line 148 of file json_valueiterator.inl.

References array_, and map_.

Referenced by Json::ValueConstIterator::operator=(), and Json::ValueIterator::operator=().

◆ decrement()

void Json::ValueIteratorBase::decrement ( )
protected

Definition at line 81 of file json_valueiterator.inl.

◆ deref()

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

Definition at line 55 of file json_valueiterator.inl.

◆ increment()

void Json::ValueIteratorBase::increment ( )
protected

Definition at line 68 of file json_valueiterator.inl.

◆ index()

UInt Json::ValueIteratorBase::index ( ) const

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

Definition at line 186 of file json_valueiterator.inl.

◆ isEqual()

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

Definition at line 131 of file json_valueiterator.inl.

References array_, and map_.

◆ key()

Value Json::ValueIteratorBase::key ( ) const

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

Definition at line 162 of file json_valueiterator.inl.

References memberName().

◆ memberName()

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

Return the member name of the referenced Value.

"" if it is not an objectValue.

Definition at line 202 of file json_valueiterator.inl.

Referenced by key().

◆ operator!=()

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

Definition at line 925 of file value.h.

◆ operator-()

difference_type Json::ValueIteratorBase::operator- ( const SelfType other) const
inline

Definition at line 927 of file value.h.

◆ operator==()

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

Definition at line 923 of file value.h.

Member Data Documentation

◆ array_

ValueInternalArray::IteratorState Json::ValueIteratorBase::array_

Definition at line 962 of file value.h.

Referenced by computeDistance(), copy(), and isEqual().

◆ map_

ValueInternalMap::IteratorState Json::ValueIteratorBase::map_

Definition at line 963 of file value.h.

Referenced by computeDistance(), copy(), and isEqual().


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