19 #ifndef JSON_VALUE_USE_INTERNAL_MAP 28 iterator_.array_ = ValueInternalArray::IteratorState();
33 #ifndef JSON_VALUE_USE_INTERNAL_MAP 43 iterator_.array_ = state;
50 iterator_.map_ = state;
57 #ifndef JSON_VALUE_USE_INTERNAL_MAP 58 return current_->second;
61 return ValueInternalArray::dereference( iterator_.array_ );
62 return ValueInternalMap::value( iterator_.map_ );
70 #ifndef JSON_VALUE_USE_INTERNAL_MAP 74 ValueInternalArray::increment( iterator_.array_ );
75 ValueInternalMap::increment( iterator_.map_ );
83 #ifndef JSON_VALUE_USE_INTERNAL_MAP 87 ValueInternalArray::decrement( iterator_.array_ );
88 ValueInternalMap::decrement( iterator_.map_ );
96 #ifndef JSON_VALUE_USE_INTERNAL_MAP 97 # ifdef JSON_USE_CPPTL_SMALLMAP 98 return current_ - other.current_;
105 if ( isNull_ && other.isNull_ )
116 for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
124 return ValueInternalArray::distance( iterator_.array_, other.iterator_.
array_ );
125 return ValueInternalMap::distance( iterator_.map_, other.iterator_.
map_ );
133 #ifndef JSON_VALUE_USE_INTERNAL_MAP 136 return other.isNull_;
138 return current_ == other.current_;
141 return ValueInternalArray::equals( iterator_.array_, other.iterator_.
array_ );
142 return ValueInternalMap::equals( iterator_.map_, other.iterator_.
map_ );
150 #ifndef JSON_VALUE_USE_INTERNAL_MAP 151 current_ = other.current_;
154 iterator_.array_ = other.iterator_.
array_;
155 iterator_.map_ = other.iterator_.
map_;
163 #ifndef JSON_VALUE_USE_INTERNAL_MAP 164 const Value::CZString czstring = (*current_).first;
165 if ( czstring.c_str() )
167 if ( czstring.isStaticString() )
169 return Value( czstring.c_str() );
171 return Value( czstring.index() );
174 return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
176 const char *
memberName = ValueInternalMap::key( iterator_.map_, isStatic );
179 return Value( memberName );
187 #ifndef JSON_VALUE_USE_INTERNAL_MAP 188 const Value::CZString czstring = (*current_).first;
189 if ( !czstring.c_str() )
190 return czstring.index();
194 return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
203 #ifndef JSON_VALUE_USE_INTERNAL_MAP 204 const char *name = (*current_).first.c_str();
205 return name ? name :
"";
208 return ValueInternalMap::key( iterator_.map_ );
227 #ifndef JSON_VALUE_USE_INTERNAL_MAP 265 #ifndef JSON_VALUE_USE_INTERNAL_MAP
difference_type computeDistance(const SelfType &other) const
bool isEqual(const SelfType &other) const
base class for Value iterators.
Lightweight wrapper to tag static string.
ValueInternalMap::IteratorState map_
void copy(const SelfType &other)
const char * memberName() const
Return the member name of the referenced Value. "" if it is not an objectValue.
const iterator for object and array value.
UInt index() const
Return the index of the referenced Value. -1 if it is not an arrayValue.
Value key() const
Return either the index or the member name of the referenced value as a Value.
SelfType & operator=(const SelfType &other)
JSON (JavaScript Object Notation).
SelfType & operator=(const ValueIteratorBase &other)
Iterator for object and array value.
ValueInternalArray::IteratorState array_