|
CPPX 1.1.2
A Modern C++ Utility Library
|
#include <cppx.h>
Public Member Functions | |
| BinaryTree () | |
| BinaryTree (const BinaryTree &other) | |
| BinaryTree & | operator= (const BinaryTree &other) |
| BinaryTree (BinaryTree &&other) noexcept=default | |
| BinaryTree & | operator= (BinaryTree &&other) noexcept=default |
| virtual | ~BinaryTree ()=default |
| Node< T > * | get_root () const |
| void | set_root (std::unique_ptr< Node< T > > root) |
| bool | is_empty () const |
| int | size () const |
| void | print_preorder () const |
| void | print_inorder () const |
| void | print_postorder () const |
| void | print_levelorder () const |
| void | set_left (Node< T > *parent, std::unique_ptr< Node< T > > left_child) |
| void | set_right (Node< T > *parent, std::unique_ptr< Node< T > > right_child) |
Static Public Member Functions | |
| static std::unique_ptr< Node< T > > | make_node (const T &val) |
| static std::unique_ptr< Node< T > > | make_node (const T &val, std::unique_ptr< Node< T > > left, std::unique_ptr< Node< T > > right) |
Protected Member Functions | |
| void | preorder (const Node< T > *node) const |
| void | inorder (const Node< T > *node) const |
| void | postorder (const Node< T > *node) const |
| void | levelorder (const Node< T > *node) const |
| int | compute_size (const Node< T > *node) const |
Protected Attributes | |
| std::unique_ptr< Node< T > > | p_head |
|
inline |
| stl_ext::BinaryTree< T >::BinaryTree | ( | const BinaryTree< T > & | other | ) |
Definition at line 109 of file binary_tree.tpp.
|
defaultnoexcept |
|
virtualdefault |
Definition at line 89 of file binary_tree.tpp.
Definition at line 123 of file binary_tree.tpp.
Definition at line 24 of file binary_tree.tpp.
| bool stl_ext::BinaryTree< T >::is_empty | ( | ) | const |
Definition at line 133 of file binary_tree.tpp.
Definition at line 71 of file binary_tree.tpp.
Definition at line 188 of file binary_tree.tpp.
|
static |
Definition at line 194 of file binary_tree.tpp.
|
defaultnoexcept |
| BinaryTree< T > & stl_ext::BinaryTree< T >::operator= | ( | const BinaryTree< T > & | other | ) |
Definition at line 115 of file binary_tree.tpp.
Definition at line 42 of file binary_tree.tpp.
Definition at line 6 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_inorder | ( | ) | const |
Definition at line 172 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_levelorder | ( | ) | const |
Definition at line 182 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_postorder | ( | ) | const |
Definition at line 177 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::print_preorder | ( | ) | const |
Definition at line 167 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::set_left | ( | Node< T > * | parent, |
| std::unique_ptr< Node< T > > | left_child | ||
| ) |
Definition at line 143 of file binary_tree.tpp.
| void stl_ext::BinaryTree< T >::set_right | ( | Node< T > * | parent, |
| std::unique_ptr< Node< T > > | right_child | ||
| ) |
Definition at line 155 of file binary_tree.tpp.
Definition at line 128 of file binary_tree.tpp.
| int stl_ext::BinaryTree< T >::size | ( | ) | const |
Definition at line 138 of file binary_tree.tpp.