Public Types | Public Member Functions | Protected Member Functions
Json::ValueIteratorBase Class Reference

base class for Value iterators. More...

#include <json.h>

Inheritance diagram for Json::ValueIteratorBase:
Json::ValueConstIterator 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

bool operator== (const SelfType &other) const
 
bool operator!= (const SelfType &other) const
 
difference_type operator- (const SelfType &other) const
 
Value key () const
 
UInt index () const
 
String name () const
 
char const * memberName () const
 
char const * memberName (char const **end) const
 
 ValueIteratorBase ()
 
 ValueIteratorBase (const Value::ObjectValues::iterator &current)
 

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.

Member Typedef Documentation

typedef std::bidirectional_iterator_tag Json::ValueIteratorBase::iterator_category
typedef unsigned int Json::ValueIteratorBase::size_t

Constructor & Destructor Documentation

Json::ValueIteratorBase::ValueIteratorBase ( )
Json::ValueIteratorBase::ValueIteratorBase ( const Value::ObjectValues::iterator &  current)
explicit

Member Function Documentation

ValueIteratorBase::difference_type Json::ValueIteratorBase::computeDistance ( const SelfType other) const
protected
void Json::ValueIteratorBase::copy ( const SelfType other)
protected
void Json::ValueIteratorBase::decrement ( )
protected
Value & Json::ValueIteratorBase::deref ( ) const
protected
void Json::ValueIteratorBase::increment ( )
protected
UInt Json::ValueIteratorBase::index ( ) const

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

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

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

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

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

Deprecated:
This cannot be used for UTF-8 strings, since there can be embedded nulls.
char const * Json::ValueIteratorBase::memberName ( char const **  end) const

Return the member name of the referenced Value, or NULL if it is not an objectValue.

Note
Better version than memberName(). Allows embedded nulls.
String Json::ValueIteratorBase::name ( ) const

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

Note
Avoid c_str() on result, as embedded zeroes are possible.
bool Json::ValueIteratorBase::operator!= ( const SelfType other) const
inline
difference_type Json::ValueIteratorBase::operator- ( const SelfType other) const
inline
bool Json::ValueIteratorBase::operator== ( const SelfType other) const
inline

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