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
Definition: DriveElementFromInputBehavior.cpp:27
Basic tree structure.
Definition: Tree.h:32
virtual ~Tree()
Destructor.
Definition: Tree.cpp:28
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
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 bool isEqual(const Tree &tree) const
Recurses through the tree, starting at the root.
Definition: Tree.cpp:42
void setRoot(std::shared_ptr< TreeNode > root)
Sets the root of the tree.
Definition: Tree.cpp:47
std::shared_ptr< TreeNode > getRoot() const
Definition: Tree.cpp:52
std::shared_ptr< TreeNode > m_root
Root of the tree.
Definition: Tree.h:69