// Chap 11, pp 529 - 530
// Reanme this file as TableB.cpp.
// ********************************************************
// Excerpts from the implementation file TableB.cpp.
// Binary search tree implementation.
// ********************************************************
#include "TableB.h" // header file
void tableClass::TableInsert(tableItemType NewItem,
boolean& Success)
{
BST.SearchTreeInsert(NewItem, Success);
if (Success)
++Size;
} // end TableInsert
void tableClass::TableDelete(keyType SearchKey,
boolean& Success)
{
BST.SearchTreeDelete(SearchKey, Success);
if (Success)
--Size;
} // end TableDelete
void tableClass::TableRetrieve(keyType SearchKey,
tableItemType& TableItem,
boolean& Success)
{
BST.SearchTreeRetrieve(SearchKey, TableItem, Success);
} // end TableRetrieve
void tableClass::TraverseTable(functionType Visit)
{
BST.InorderTraverse(Visit);
} // end TraverseTable
void tableClass::SetSize(int NewSize)
{
Size = NewSize;
} // end SetSize
// End of implementation file.
               (
geocities.com/siliconvalley/program/2864/ds)                   (
geocities.com/siliconvalley/program/2864)                   (
geocities.com/siliconvalley/program)                   (
geocities.com/siliconvalley)