|
JSON Voorhees
Killer JSON for C++
|
Public Types | |
| using | value_type = ast_node |
Public Member Functions | |
| iterator & | operator++ () |
| iterator | operator++ (int) |
| iterator & | skip_subtree () |
| Move to the node after the structure this iterator is on, however much is inside it. | |
| value_type | operator* () const |
| bool | operator== (const iterator &other) const |
| bool | operator!= (const iterator &other) const |
| bool | operator< (const iterator &other) const |
| bool | operator<= (const iterator &other) const |
| bool | operator> (const iterator &other) const |
| bool | operator>= (const iterator &other) const |
Friends | |
| class | parse_index |
Definition at line 32 of file parse_index.hpp.
Definition at line 35 of file parse_index.hpp.
Definition at line 73 of file parse_index.hpp.
Definition at line 41 of file parse_index.hpp.
Definition at line 75 of file parse_index.hpp.
Definition at line 77 of file parse_index.hpp.
Definition at line 71 of file parse_index.hpp.
Definition at line 79 of file parse_index.hpp.
Definition at line 81 of file parse_index.hpp.
| iterator & jsonv::parse_index::iterator::skip_subtree | ( | ) |
Move to the node after the structure this iterator is on, however much is inside it.
This is a constant-time operation. The index records where each structure ends as it parses the matching close token, so stepping over a subtree costs the same whether it holds one element or a million. Use it to ignore a value without paying to walk it.
If the structure was never closed – only possible when parse_index::success is false – the error which truncated the document stands in as its end, so this moves to the end of the index.
| std::invalid_argument | if this iterator is not on a ast_node_type::document_start, ast_node_type::object_begin or ast_node_type::array_begin. |
|
friend |
Definition at line 89 of file parse_index.hpp.