13 ValueIteratorBase::ValueIteratorBase()
14 #ifndef JSON_VALUE_USE_INTERNAL_MAP
23 iterator_.array_ = ValueInternalArray::IteratorState();
28 #ifndef JSON_VALUE_USE_INTERNAL_MAP
29 ValueIteratorBase::ValueIteratorBase(
const Value::ObjectValues::iterator ¤t )
38 iterator_.array_ = state;
45 iterator_.map_ = state;
52 #ifndef JSON_VALUE_USE_INTERNAL_MAP
53 return current_->second;
56 return ValueInternalArray::dereference( iterator_.array_ );
57 return ValueInternalMap::value( iterator_.map_ );
65 #ifndef JSON_VALUE_USE_INTERNAL_MAP
69 ValueInternalArray::increment( iterator_.array_ );
70 ValueInternalMap::increment( iterator_.map_ );
78 #ifndef JSON_VALUE_USE_INTERNAL_MAP
82 ValueInternalArray::decrement( iterator_.array_ );
83 ValueInternalMap::decrement( iterator_.map_ );
91 #ifndef JSON_VALUE_USE_INTERNAL_MAP
92 # ifdef JSON_USE_CPPTL_SMALLMAP
93 return current_ - other.current_;
100 if ( isNull_ && other.isNull_ )
111 for ( Value::ObjectValues::iterator it = current_; it != other.current_; ++it )
119 return ValueInternalArray::distance( iterator_.array_, other.iterator_.array_ );
120 return ValueInternalMap::distance( iterator_.map_, other.iterator_.map_ );
128 #ifndef JSON_VALUE_USE_INTERNAL_MAP
131 return other.isNull_;
133 return current_ == other.current_;
136 return ValueInternalArray::equals( iterator_.array_, other.iterator_.array_ );
137 return ValueInternalMap::equals( iterator_.map_, other.iterator_.map_ );
145 #ifndef JSON_VALUE_USE_INTERNAL_MAP
146 current_ = other.current_;
149 iterator_.array_ = other.iterator_.array_;
150 iterator_.map_ = other.iterator_.map_;
158 #ifndef JSON_VALUE_USE_INTERNAL_MAP
159 const Value::CZString czstring = (*current_).first;
160 if ( czstring.c_str() )
162 if ( czstring.isStaticString() )
163 return Value( StaticString( czstring.c_str() ) );
164 return Value( czstring.c_str() );
166 return Value( czstring.index() );
169 return Value( ValueInternalArray::indexOf( iterator_.array_ ) );
171 const char *
memberName = ValueInternalMap::key( iterator_.map_, isStatic );
173 return Value( StaticString( memberName ) );
174 return Value( memberName );
182 #ifndef JSON_VALUE_USE_INTERNAL_MAP
183 const Value::CZString czstring = (*current_).first;
184 if ( !czstring.c_str() )
185 return czstring.index();
189 return Value::UInt( ValueInternalArray::indexOf( iterator_.array_ ) );
198 #ifndef JSON_VALUE_USE_INTERNAL_MAP
199 const char *name = (*current_).first.c_str();
200 return name ? name :
"";
203 return ValueInternalMap::key( iterator_.map_ );
222 #ifndef JSON_VALUE_USE_INTERNAL_MAP
224 : ValueIteratorBase( current )
229 : ValueIteratorBase( state )
234 : ValueIteratorBase( state )
260 #ifndef JSON_VALUE_USE_INTERNAL_MAP
262 : ValueIteratorBase( current )
267 : ValueIteratorBase( state )
272 : ValueIteratorBase( state )
278 : ValueIteratorBase( other )
283 : ValueIteratorBase( other )