|
|
BinaryTree Class Reference#include <BinaryTree.h>
List of all members.
Detailed Description
ADT binary tree.
Definition at line 24 of file BinaryTree.h.
|
Public Member Functions |
| | BinaryTree () |
| | BinaryTree (const TreeItemType &rootItem) throw (TreeException) |
| | BinaryTree (const TreeItemType &rootItem, BinaryTree &leftTree, BinaryTree &rightTree) throw (TreeException) |
| | BinaryTree (const BinaryTree &tree) throw (TreeException) |
| virtual | ~BinaryTree () |
| virtual bool | isEmpty () const |
| virtual TreeItemType | getRootData () const throw (TreeException) |
| virtual void | setRootData (const TreeItemType &newItem) throw (TreeException) |
| virtual void | attachLeft (const TreeItemType &newItem) throw (TreeException) |
| virtual void | attachRight (const TreeItemType &newItem) throw (TreeException) |
| virtual void | attachLeftSubtree (BinaryTree &leftTree) throw (TreeException) |
| virtual void | attachRightSubtree (BinaryTree &rightTree) throw (TreeException) |
| virtual void | detachLeftSubtree (BinaryTree &leftTree) throw (TreeException) |
| virtual void | detachRightSubtree (BinaryTree &rightTree) throw (TreeException) |
| virtual BinaryTree | getLeftSubtree () const throw (TreeException) |
| virtual BinaryTree | getRightSubtree () const throw (TreeException) |
| virtual void | preorderTraverse (FunctionType visit) |
| virtual void | inorderTraverse (FunctionType visit) |
| virtual void | postorderTraverse (FunctionType visit) |
| virtual BinaryTree & | operator= (const BinaryTree &rhs) throw (TreeException) |
Protected Member Functions |
| | BinaryTree (TreeNode *nodePtr) |
| void | copyTree (TreeNode *treePtr, TreeNode *&newTreePtr) const throw (TreeException) |
| void | destroyTree (TreeNode *&treePtr) |
| TreeNode * | rootPtr () const |
| void | setRootPtr (TreeNode *newRoot) |
| void | getChildPtrs (TreeNode *nodePtr, TreeNode *&leftChildPtr, TreeNode *&rightChildPtr) const |
| void | setChildPtrs (TreeNode *nodePtr, TreeNode *leftChildPtr, TreeNode *rightChildPtr) |
| void | preorder (TreeNode *treePtr, FunctionType visit) |
| void | inorder (TreeNode *treePtr, FunctionType visit) |
| void | postorder (TreeNode *treePtr, FunctionType visit) |
Private Attributes |
| TreeNode * | root |
Constructor & Destructor Documentation
| BinaryTree::BinaryTree |
( |
|
) |
|
|
| BinaryTree::~BinaryTree |
( |
|
) |
[virtual] |
|
| BinaryTree::BinaryTree |
( |
TreeNode * |
nodePtr |
) |
[protected] |
|
Member Function Documentation
| bool BinaryTree::isEmpty |
( |
|
) |
const [virtual] |
|
| void BinaryTree::preorderTraverse |
( |
FunctionType |
visit |
) |
[virtual] |
|
| void BinaryTree::inorderTraverse |
( |
FunctionType |
visit |
) |
[virtual] |
|
| void BinaryTree::postorderTraverse |
( |
FunctionType |
visit |
) |
[virtual] |
|
| void BinaryTree::destroyTree |
( |
TreeNode *& |
treePtr |
) |
[protected] |
|
| TreeNode * BinaryTree::rootPtr |
( |
|
) |
const [protected] |
|
| void BinaryTree::setRootPtr |
( |
TreeNode * |
newRoot |
) |
[protected] |
|
| void BinaryTree::getChildPtrs |
( |
TreeNode * |
nodePtr, |
|
|
TreeNode *& |
leftChildPtr, |
|
|
TreeNode *& |
rightChildPtr |
|
) |
const [protected] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|