Go to the documentation of this file.
16 #ifndef SURGSIM_DATASTRUCTURES_TREE_H
17 #define SURGSIM_DATASTRUCTURES_TREE_H
24 namespace DataStructures
43 void setRoot(std::shared_ptr<TreeNode> root);
46 std::shared_ptr<TreeNode>
getRoot()
const;
77 #endif // SURGSIM_DATASTRUCTURES_TREE_H
Basic tree structure.
Definition: Tree.h:33
bool operator==(const Tree &tree) const
If the trees are not of the same type, returns false; otherwise, compares with the implementation of ...
Definition: Tree.cpp:32
std::shared_ptr< TreeNode > getRoot() const
Definition: Tree.cpp:52
void setRoot(std::shared_ptr< TreeNode > root)
Sets the root of the tree.
Definition: Tree.cpp:47
Definition: CompoundShapeToGraphics.cpp:30
virtual bool isEqual(const Tree &tree) const
Recurses through the tree, starting at the root.
Definition: Tree.cpp:42
std::shared_ptr< TreeNode > m_root
Root of the tree.
Definition: Tree.h:69
bool operator!=(const Tree &tree) const
If the trees are not of the same type, returns false; otherwise, compares with the implementation of ...
Definition: Tree.cpp:37
Tree()
Constructor. After construction, the root is null.
Definition: Tree.cpp:24
virtual ~Tree()
Destructor.
Definition: Tree.cpp:28