|
Orcus
|
Classes | |
| struct | node_properties |
| class | walker |
Public Types | |
| enum class | node_type : uint8_t { unknown = 0 , array = 1 , object = 2 , object_key = 3 , value = 4 } |
| enum class | callback_type : uint8_t { unknown = 0 , on_repeat_node } |
| using | callback_handler_type = std::function<void(std::any)> |
| using | range_handler_type = std::function<void(table_range_t&&)> |
Public Member Functions | |
| structure_tree (const structure_tree &)=delete | |
| structure_tree & | operator= (const structure_tree &)=delete |
| void | set_callback (callback_type type, callback_handler_type callback) |
| void | parse (std::string_view stream) |
| void | normalize_tree () |
| void | dump_compact (std::ostream &os) const |
| walker | get_walker () const |
| void | process_ranges (range_handler_type rh) const |
| using orcus::json::structure_tree::callback_handler_type = std::function<void(std::any)> |
Callback function type. It must take one argument. What value is assigned and what the type of a value is depends on the location of the callback. Refer to callback_type for details.
|
strong |
Location of a callback function.
| void orcus::json::structure_tree::normalize_tree | ( | ) |
For now, normalizing a tree just means sorting child nodes. We may add other normalization stuff later.
| void orcus::json::structure_tree::set_callback | ( | callback_type | type, |
| callback_handler_type | callback ) |
Assign a user-defined callback function in a specified point of execution during parsing.
| type | Location where the callback function will be called. |
| callback | Callback function. |