#include <genesis/utils/formats/json/document.hpp>
Template for a random access iterator for the JsonDocument class.
This class implements a both iterators (iterator and const_iterator) for the JsonDocument class.
The class satisfies the following concept requirements: RandomAccessIterator. The iterator that can be moved to point (forward and backward) to any element in constant time.
This class is a heavily altered adaption of the excellent JSON for Modern C++ library by Niels Lohmann, see also Acknowledgements.
Definition at line 88 of file json/document.hpp.
Public Member Functions | |
| JsonIterator ()=default | |
| JsonIterator (const JsonIterator &other) noexcept | |
| Copy constructor. More... | |
| JsonIterator (pointer object) | |
| Constructor for a given JSON instance. More... | |
| JsonDocument::ObjectType::key_type | key () const |
| return the key of an object iterator More... | |
| bool | operator!= (const JsonIterator &other) const |
| comparison: not equal More... | |
| reference | operator* () const |
| Return a reference to the value pointed to by the iterator. More... | |
| JsonIterator | operator+ (difference_type i) |
| add to iterator More... | |
| JsonIterator & | operator++ () |
| Pre-increment (++it). More... | |
| JsonIterator | operator++ (int) |
| Post-increment (it++). More... | |
| JsonIterator & | operator+= (difference_type i) |
| add to iterator More... | |
| difference_type | operator- (const JsonIterator &other) const |
| return difference More... | |
| JsonIterator | operator- (difference_type i) |
| subtract from iterator More... | |
| JsonIterator & | operator-- () |
| pre-decrement (–it) More... | |
| JsonIterator | operator-- (int) |
| Post-decrement (it–). More... | |
| JsonIterator & | operator-= (difference_type i) |
| subtract from iterator More... | |
| pointer | operator-> () const |
| Dereference the Iterator. More... | |
| bool | operator< (const JsonIterator &other) const |
| comparison: smaller More... | |
| bool | operator<= (const JsonIterator &other) const |
| comparison: less than or equal More... | |
| JsonIterator & | operator= (JsonIterator other) noexcept(std::is_nothrow_move_constructible< pointer >::value and std::is_nothrow_move_assignable< pointer >::value and std::is_nothrow_move_constructible< InternalIterator >::value and std::is_nothrow_move_assignable< InternalIterator >::value) |
| Copy assignment. More... | |
| bool | operator== (const JsonIterator &other) const |
| comparison: equal More... | |
| bool | operator> (const JsonIterator &other) const |
| comparison: greater than More... | |
| bool | operator>= (const JsonIterator &other) const |
| comparison: greater than or equal More... | |
| reference | operator[] (difference_type n) const |
| access to successor More... | |
| reference | value () const |
| return the value of an iterator More... | |
Public Types | |
| using | difference_type = typename JsonDocument::difference_type |
| using | iterator_category = std::bidirectional_iterator_tag |
| using | pointer = typename std::conditional< std::is_const< U >::value, typename JsonDocument::const_pointer, typename JsonDocument::pointer >::type |
| using | reference = typename std::conditional< std::is_const< U >::value, typename JsonDocument::const_reference, typename JsonDocument::reference >::type |
| using | value_type = typename JsonDocument::value_type |
Classes | |
| struct | InternalIterator |
| an iterator value More... | |
| class | PrimitiveIterator |
| an iterator for primitive JSON types More... | |
Friends | |
| class | JsonDocument |
|
default |
|
inlineexplicit |
Constructor for a given JSON instance.
Definition at line 239 of file formats/json/iterator.hpp.
|
inlinenoexcept |
Copy constructor.
Definition at line 265 of file formats/json/iterator.hpp.
|
inline |
return the key of an object iterator
object_ != nullptr. Definition at line 627 of file formats/json/iterator.hpp.
|
inline |
comparison: not equal
object_ != nullptr. Definition at line 451 of file formats/json/iterator.hpp.
|
inline |
Return a reference to the value pointed to by the iterator.
object_ != nullptr. Definition at line 294 of file formats/json/iterator.hpp.
|
inline |
add to iterator
object_ != nullptr. Definition at line 547 of file formats/json/iterator.hpp.
|
inline |
Pre-increment (++it).
object_ != nullptr. Definition at line 362 of file formats/json/iterator.hpp.
|
inline |
Post-increment (it++).
object_ != nullptr. Definition at line 351 of file formats/json/iterator.hpp.
|
inline |
add to iterator
object_ != nullptr. Definition at line 513 of file formats/json/iterator.hpp.
|
inline |
return difference
object_ != nullptr. Definition at line 569 of file formats/json/iterator.hpp.
|
inline |
subtract from iterator
object_ != nullptr. Definition at line 558 of file formats/json/iterator.hpp.
|
inline |
pre-decrement (–it)
object_ != nullptr. Definition at line 399 of file formats/json/iterator.hpp.
|
inline |
Post-decrement (it–).
object_ != nullptr. Definition at line 388 of file formats/json/iterator.hpp.
|
inline |
subtract from iterator
object_ != nullptr. Definition at line 538 of file formats/json/iterator.hpp.
|
inline |
Dereference the Iterator.
object_ != nullptr. Definition at line 324 of file formats/json/iterator.hpp.
|
inline |
comparison: smaller
object_ != nullptr. Definition at line 460 of file formats/json/iterator.hpp.
|
inline |
comparison: less than or equal
object_ != nullptr. Definition at line 486 of file formats/json/iterator.hpp.
|
inlinenoexcept |
Copy assignment.
Definition at line 273 of file formats/json/iterator.hpp.
|
inline |
comparison: equal
object_ != nullptr. Definition at line 425 of file formats/json/iterator.hpp.
|
inline |
comparison: greater than
object_ != nullptr. Definition at line 495 of file formats/json/iterator.hpp.
|
inline |
comparison: greater than or equal
object_ != nullptr. Definition at line 504 of file formats/json/iterator.hpp.
|
inline |
access to successor
object_ != nullptr. Definition at line 592 of file formats/json/iterator.hpp.
|
inline |
return the value of an iterator
object_ != nullptr. Definition at line 642 of file formats/json/iterator.hpp.
|
friend |
Definition at line 109 of file formats/json/iterator.hpp.
| using difference_type = typename JsonDocument::difference_type |
Definition at line 125 of file formats/json/iterator.hpp.
| using iterator_category = std::bidirectional_iterator_tag |
Definition at line 136 of file formats/json/iterator.hpp.
| using pointer = typename std::conditional<std::is_const<U>::value, typename JsonDocument::const_pointer, typename JsonDocument::pointer >::type |
Definition at line 130 of file formats/json/iterator.hpp.
| using reference = typename std::conditional<std::is_const<U>::value, typename JsonDocument::const_reference, typename JsonDocument::reference >::type |
Definition at line 134 of file formats/json/iterator.hpp.
| using value_type = typename JsonDocument::value_type |
Definition at line 124 of file formats/json/iterator.hpp.