SpatiumLib
|
#include <Tree.h>
Public Member Functions | |
Tree (std::shared_ptr< TreeNode< G >> rootNode=std::make_shared< TreeNode< G >>()) | |
Constructor. More... | |
Tree (const G &rootObject, const std::shared_ptr< TreeNode< G >> &rootNode=std::make_shared< TreeNode< G >>()) | |
Constructor. More... | |
std::shared_ptr< TreeNode< G > > | root () const |
Get the root node. More... | |
TreeIterator< G > | begin () |
Get iterator pointing to the beginning of the tree (root node). More... | |
TreeIterator< G > | end () |
Get iterator pointing to the end of the tree. More... | |
Protected Attributes | |
const std::shared_ptr< TreeNode< G > > | m_root |
Tree data structure.
Tree is a hierarchical data structure composed of nodes (TreeNode). It has one node that represents the root of the tree.
|
inline |
Constructor.
[in] | rootNode | Root node (optional) |
|
inline |
Constructor.
[in] | rootObject | Object for root node |
[in] | rootNode | Root node (optional) |
|
inline |
Get iterator pointing to the beginning of the tree (root node).
This iterator traverses the tree in depth-first order.
|
inline |
Get iterator pointing to the end of the tree.
This iterator traverses the tree in depth-first order.
|
inline |
Get the root node.
|
protected |