Orcus
|
Public Member Functions | |
walker (const walker &other) | |
void | root () |
void | descend (size_t child_pos) |
void | ascend () |
size_t | child_count () const |
node_properties | get_node () const |
std::vector< std::string > | build_field_paths () const |
std::string | build_row_group_path () const |
Friends | |
class | structure_tree |
void orcus::json::structure_tree::walker::ascend | ( | ) |
Move up to the parent node of the current node.
std::vector<std::string> orcus::json::structure_tree::walker::build_field_paths | ( | ) | const |
Build one or more field paths for the current value node. For a value node that is a child of an object, you'll always get one path, whereas a value node that is a chlid of an array, you may get more than one field paths.
std::string orcus::json::structure_tree::walker::build_row_group_path | ( | ) | const |
Build a path for the parent of the current repeating node. A row group is an anchor to which repeating nodes get anchored to. It is used to determine when to increment row position during mapping.
size_t orcus::json::structure_tree::walker::child_count | ( | ) | const |
Return the number of child nodes the current node has.
void orcus::json::structure_tree::walker::descend | ( | size_t | child_pos | ) |
Move down to a child node at specified position. Call child_count() to get the number of child nodes the current node has. A child node position is 0-based and must be less than the child count.
child_pos | 0-based index of the child node to move down to. |
node_properties orcus::json::structure_tree::walker::get_node | ( | ) | const |
Get the properties of the current node.
void orcus::json::structure_tree::walker::root | ( | ) |
Set the current position to the root node, and return its properties.