base class for Value iterators. More...
#include <json/value.h>
Public Types | |
| using | iterator_category = std::bidirectional_iterator_tag |
| using | size_t = unsigned int |
| using | difference_type = int |
| using | SelfType = ValueIteratorBase |
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 |
| Return either the index or the member name of the referenced value as a Value. | |
| 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. | |
| __declspec (deprecated("Use `key = name();` instead.")) char const *memberName() const | |
| Return the member name of the referenced Value. | |
| char const * | memberName (char const **end) const |
| Return the member name of the referenced Value, or NULL if it is not an objectValue. | |
| ValueIteratorBase () | |
| ValueIteratorBase (const Value::ObjectValues::iterator ¤t) | |
Protected Member Functions | |
| const Value & | deref () const |
| Value & | deref () |
| void | increment () |
| void | decrement () |
| difference_type | computeDistance (const SelfType &other) const |
| bool | isEqual (const SelfType &other) const |
| void | copy (const SelfType &other) |
| using Json::ValueIteratorBase::difference_type = int |
| using Json::ValueIteratorBase::iterator_category = std::bidirectional_iterator_tag |
| using Json::ValueIteratorBase::size_t = unsigned int |
| Json::ValueIteratorBase::ValueIteratorBase | ( | ) |
Definition at line 18 of file json_valueiterator.inl.
Referenced by Json::ValueConstIterator::operator=(), Json::ValueConstIterator::ValueConstIterator(), Json::ValueConstIterator::ValueConstIterator(), and Json::ValueIterator::ValueIterator().
|
explicit |
Definition at line 20 of file json_valueiterator.inl.
Return the member name of the referenced Value.
"" if it is not an objectValue.
References computeDistance(), copy(), decrement(), deref(), increment(), isEqual(), and memberName().
|
protected |
Definition at line 32 of file json_valueiterator.inl.
Referenced by __declspec(), and operator-().
|
protected |
Definition at line 62 of file json_valueiterator.inl.
Referenced by __declspec(), Json::ValueConstIterator::operator=(), and Json::ValueIterator::operator=().
|
protected |
Definition at line 29 of file json_valueiterator.inl.
Referenced by __declspec(), Json::ValueConstIterator::operator--(), and Json::ValueIterator::operator--().
|
protected |
Definition at line 24 of file json_valueiterator.inl.
|
protected |
Internal utility functions to assist with implementing other iterator functions. The const and non-const versions of the "deref" protected methods expose the protected current_ member variable in a way that can often be optimized away by the compiler.
Definition at line 25 of file json_valueiterator.inl.
Referenced by __declspec(), Json::ValueConstIterator::operator*(), Json::ValueIterator::operator*(), Json::ValueConstIterator::operator->(), and Json::ValueIterator::operator->().
|
protected |
Definition at line 27 of file json_valueiterator.inl.
Referenced by __declspec(), Json::ValueConstIterator::operator++(), and Json::ValueIterator::operator++().
| UInt Json::ValueIteratorBase::index | ( | ) | const |
Return the index of the referenced Value, or -1 if it is not an arrayValue.
Definition at line 77 of file json_valueiterator.inl.
|
protected |
Definition at line 55 of file json_valueiterator.inl.
Referenced by __declspec(), operator!=(), and operator==().
| Value Json::ValueIteratorBase::key | ( | ) | const |
Return either the index or the member name of the referenced value as a Value.
Definition at line 67 of file json_valueiterator.inl.
| 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.
Definition at line 93 of file json_valueiterator.inl.
Referenced by __declspec(), and name().
| String Json::ValueIteratorBase::name | ( | ) | const |
Return the member name of the referenced Value, or "" if it is not an objectValue.
Definition at line 84 of file json_valueiterator.inl.
References memberName().
|
inline |
|
inline |
Definition at line 781 of file value.h.
References computeDistance().
|
inline |
1.14.0