Base Framework
|
Binary tree. More...
#include <base/collection/BinaryTree.h>
Inherits Collection.
Inherited by OrderedBinaryTree< TYPE, KEY > [protected]
.
Classes | |
class | BinaryTreeImpl |
Public Types | |
typedef TYPE | Value |
typedef BinaryNode< TYPE > | Node |
typedef PrefixOrderEnumerator< EnumeratorTraits< Node > > | Enumerator |
typedef PrefixOrderEnumerator< ReadEnumeratorTraits< Node > > | ReadEnumerator |
typedef PrefixOrderIterator< ReadIteratorTraits< Node > > | ReadIterator |
Public Member Functions | |
BinaryTree () | |
BinaryTree (const BinaryTree ©) noexcept | |
BinaryTree & | operator= (const BinaryTree ©) noexcept |
bool | isEmpty () const noexcept |
Node * | getRoot () |
const Node * | getRoot () const noexcept |
Enumerator | getEnumerator () noexcept |
ReadEnumerator | getReadEnumerator () const noexcept |
void | setRoot (Node *node) |
void | removeAll () |
Protected Attributes | |
Reference< BinaryTreeImpl > | elements |
Binary tree.
Binary tree data structure.
typedef BinaryNode<TYPE> BinaryTree< TYPE >::Node |
The type of a node.
typedef TYPE BinaryTree< TYPE >::Value |
The type of the value.
|
inline |
Initializes an empty binary tree.
|
inlinenoexcept |
Initializes binary tree from other binary tree.
|
inlinenoexcept |
Returns a modifying enumerator of the binary tree.
|
inlinenoexcept |
Returns a non-modifying enumerator of the binary tree.
|
inline |
Returns the root node of the binary tree for modifying access.
|
inlinenoexcept |
Returns the root node of the binary tree for non-modifying access.
|
inlinenoexcept |
Returns true if the tree has a root node.
|
inlinenoexcept |
Assignment of binary tree to binary tree.
|
inline |
Removes all the nodes from the binary tree.
|
inline |
Sets the binary tree.
node | The root of the tree. |
|
protected |
The elements of the binary tree.