Iterator for formats::json::Value
More...
#include <userver/formats/json/iterator.hpp>
Public Types | |
| using | iterator_category = std::forward_iterator_tag |
| using | difference_type = std::ptrdiff_t |
| using | value_type = typename Traits::ValueType |
| using | reference = typename Traits::Reference |
| using | pointer = typename Traits::Pointer |
| using | ContainerType = typename Traits::ContainerType |
Public Member Functions | |
| Iterator (ContainerType container, int pos) | |
| Iterator (const Iterator &other) | |
| Iterator (Iterator &&other) noexcept | |
| Iterator & | operator= (const Iterator &other) |
| Iterator & | operator= (Iterator &&other) noexcept |
| Iterator | operator++ (int) |
| Iterator & | operator++ () |
| reference | operator* () const |
| pointer | operator-> () const |
| bool | operator== (const Iterator &other) const |
| bool | operator!= (const Iterator &other) const |
| template<typename T = void> | |
| std::string | GetName () const |
| Returns name of the referenced field. | |
| size_t | GetIndex () const |
| Returns index of the referenced field. | |
Iterator for formats::json::Value
Definition at line 19 of file iterator.hpp.
| using formats::json::Iterator< Traits, Direction >::ContainerType = typename Traits::ContainerType |
Definition at line 27 of file iterator.hpp.
| using formats::json::Iterator< Traits, Direction >::difference_type = std::ptrdiff_t |
Definition at line 22 of file iterator.hpp.
| using formats::json::Iterator< Traits, Direction >::iterator_category = std::forward_iterator_tag |
Definition at line 21 of file iterator.hpp.
| using formats::json::Iterator< Traits, Direction >::pointer = typename Traits::Pointer |
Definition at line 25 of file iterator.hpp.
| using formats::json::Iterator< Traits, Direction >::reference = typename Traits::Reference |
Definition at line 24 of file iterator.hpp.
| using formats::json::Iterator< Traits, Direction >::value_type = typename Traits::ValueType |
Definition at line 23 of file iterator.hpp.
| size_t formats::json::Iterator< Traits, Direction >::GetIndex | ( | ) | const |
Returns index of the referenced field.
| `TypeMismatchException` | if iterated value is not an array |
|
inline |
Returns name of the referenced field.
| `TypeMismatchException` | if iterated value is not an object |
Definition at line 49 of file iterator.hpp.