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>

+ Inheritance diagram for Json::ValueIteratorBase:
+ Collaboration diagram for Json::ValueIteratorBase:

Public Types

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. "" if it is not an objectValue. 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 879 of file value.h.

Member Typedef Documentation

◆ difference_type

Definition at line 883 of file value.h.

◆ SelfType

Definition at line 884 of file value.h.

◆ size_t

typedef unsigned int Json::ValueIteratorBase::size_t

Definition at line 882 of file value.h.

Constructor & Destructor Documentation

◆ ValueIteratorBase() [1/3]

ValueIteratorBase::ValueIteratorBase ( )

Definition at line 13 of file json_valueiterator.inl.

◆ ValueIteratorBase() [2/3]

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

Definition at line 35 of file json_valueiterator.inl.

◆ ValueIteratorBase() [3/3]

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

Definition at line 42 of file json_valueiterator.inl.

Member Function Documentation

◆ computeDistance()

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

Definition at line 89 of file json_valueiterator.inl.

References array_, and map_.

Referenced by operator-().

+ Here is the caller graph for this function:

◆ copy()

void ValueIteratorBase::copy ( const SelfType other)
protected

Definition at line 143 of file json_valueiterator.inl.

References array_, and map_.

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

+ Here is the caller graph for this function:

◆ decrement()

void ValueIteratorBase::decrement ( )
protected

Definition at line 76 of file json_valueiterator.inl.

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

+ Here is the caller graph for this function:

◆ deref()

Value & ValueIteratorBase::deref ( ) const
protected

Definition at line 50 of file json_valueiterator.inl.

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

+ Here is the caller graph for this function:

◆ increment()

void ValueIteratorBase::increment ( )
protected

Definition at line 63 of file json_valueiterator.inl.

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

+ Here is the caller graph for this function:

◆ index()

UInt ValueIteratorBase::index ( ) const

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

Definition at line 180 of file json_valueiterator.inl.

◆ isEqual()

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

Definition at line 126 of file json_valueiterator.inl.

References array_, and map_.

Referenced by operator!=(), and operator==().

+ Here is the caller graph for this function:

◆ key()

Value ValueIteratorBase::key ( ) const

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

Definition at line 156 of file json_valueiterator.inl.

References memberName().

◆ memberName()

const char * ValueIteratorBase::memberName ( ) const

Return the member name of the referenced Value. "" if it is not an objectValue.

Definition at line 196 of file json_valueiterator.inl.

Referenced by key().

+ Here is the caller graph for this function:

◆ operator!=()

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

Definition at line 899 of file value.h.

References isEqual().

◆ operator-()

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

Definition at line 904 of file value.h.

References computeDistance().

◆ operator==()

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

Definition at line 894 of file value.h.

References isEqual().

Member Data Documentation

◆ array_

ValueInternalArray::IteratorState Json::ValueIteratorBase::array_

Definition at line 939 of file value.h.

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

◆ map_

ValueInternalMap::IteratorState Json::ValueIteratorBase::map_

Definition at line 940 of file value.h.

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


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

SourceForge Logo hosts this site. Send comments to:
Json-cpp Developers