{ "format": 1, "id": "saw-tree", "kind": "class", "name": "tree", "namespace": "saw", "module": "core", "header": "modules/core/c++/tree.hpp", "brief_description": "A tree of values, tying the recursive knot.", "detailed_description": [ [ "A thin wrapper over a", {"name": "tree_container", "id": "saw-tree_container"}, "whose branches hold this very type. The container and the", {"name": "branch", "id": "saw-branch"}, "are written against an open Tree parameter precisely so that this class can close it, which keeps the two of them usable for other node types as well." ], [ "This is the type to reach for; the other two are the machinery underneath." ] ], "templates": [ {"name": "T", "kind": "type", "brief_description": "Leaf value type."} ], "attributes": { "saw-tree-data_": { "id": "saw-tree-data_", "name": "data_", "type": [{"name": "tree_container", "id": "saw-tree_container"}, "< T, tree< T > >"], "visibility": "private" } }, "functions": { "saw-tree-reserve": { "id": "saw-tree-reserve", "name": "reserve", "type": ["error_or< void >"], "brief_description": "Reserves room for branches up front.", "parameters": [ {"name": "size", "type": ["std::size_t"]} ] }, "saw-tree-size": { "id": "saw-tree-size", "name": "size", "type": ["size_t"], "const": true, "brief_description": "Number of branches directly below this node." }, "saw-tree-add-1": { "id": "saw-tree-add-1", "name": "add", "type": ["error_or< size_t >"], "brief_description": "Adds a branch holding a sub tree and returns its index." }, "saw-tree-add-2": { "id": "saw-tree-add-2", "name": "add", "type": ["error_or< size_t >"], "brief_description": "Adds a branch holding a leaf and returns its index.", "parameters": [ {"name": "leaf", "type": ["T"]} ] }, "saw-tree-at": { "id": "saw-tree-at", "name": "at", "type": [{"name": "branch", "id": "saw-branch"}, "< T, tree< T > > &"], "brief_description": "The branch at an index.", "parameters": [ {"name": "i", "type": ["size_t"]} ] } } }