21 const Value::ObjectValues::iterator& current)
22 : current_(current), isNull_(false) {}
33#ifdef JSON_USE_CPPTL_SMALLMAP
34 return other.current_ - current_;
41 if (isNull_ && other.isNull_) {
51 for (Value::ObjectValues::iterator it = current_; it != other.current_;
63 return current_ == other.current_;
67 current_ = other.current_;
68 isNull_ = other.isNull_;
72 const Value::CZString czstring = (*current_).first;
73 if (czstring.data()) {
74 if (czstring.isStaticString())
76 return Value(czstring.data(), czstring.data() + czstring.length());
78 return Value(czstring.index());
82 const Value::CZString czstring = (*current_).first;
84 return czstring.index();
98 const char* cname = (*current_).first.data();
99 return cname ? cname :
"";
103 const char* cname = (*current_).first.data();
108 *end = cname + (*current_).first.length();
123 const Value::ObjectValues::iterator& current)
124 : ValueIteratorBase(current) {}
150 throwRuntimeError(
"ConstIterator to Iterator should never be allowed.");
Lightweight wrapper to tag static string.
const iterator for object and array value.
SelfType & operator=(const ValueIteratorBase &other)
base class for Value iterators.
bool isEqual(const SelfType &other) const
Value key() const
Return either the index or the member name of the referenced value as a Value.
char const * memberName(char const **end) const
Return the member name of the referenced Value, or NULL if it is not an objectValue.
void copy(const SelfType &other)
UInt index() const
Return the index of the referenced Value, or -1 if it is not an arrayValue.
String name() const
Return the member name of the referenced Value, or "" if it is not an objectValue.
const Value & deref() const
difference_type computeDistance(const SelfType &other) const
Iterator for object and array value.
SelfType & operator=(const SelfType &other)
JSON (JavaScript Object Notation).
std::basic_string< char, std::char_traits< char >, Allocator< char > > String