text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

Table Class Reference

#include <TableB.h>

List of all members.


Detailed Description

ADT table Binary search tree implementation. Assumption: A table contains at most one item with a given search key at any time.

Definition at line 28 of file TableB.h.

Public Member Functions

 Table ()
virtual ~Table ()
virtual bool tableIsEmpty () const
virtual int tableLength () const
virtual void tableInsert (const TableItemType &newItem) throw (TableException)
virtual void tableDelete (KeyType searchKey) throw (TableException)
virtual void tableRetrieve (KeyType searchKey, TableItemType &tableItem) const throw (TableException)
virtual void traverseTable (FunctionType visit)

Protected Member Functions

void setSize (int newSize)

Private Attributes

BinarySearchTree bst
int size


Constructor & Destructor Documentation

Table::Table  ) 
 

Default constructor.

virtual Table::~Table  )  [virtual]
 

Destructor.


Member Function Documentation

virtual bool Table::tableIsEmpty  )  const [virtual]
 

virtual int Table::tableLength  )  const [virtual]
 

void Table::tableInsert const TableItemType newItem  )  throw (TableException) [virtual]
 

Definition at line 22 of file TableB.cpp.

Referenced by main().

void Table::tableDelete KeyType  searchKey  )  throw (TableException) [virtual]
 

Definition at line 36 of file TableB.cpp.

void Table::tableRetrieve KeyType  searchKey,
TableItemType tableItem
const throw (TableException) [virtual]
 

Definition at line 47 of file TableB.cpp.

void Table::traverseTable FunctionType  visit  )  [virtual]
 

Definition at line 59 of file TableB.cpp.

References bst, and BinarySearchTree::inorderTraverse().

void Table::setSize int  newSize  )  [protected]
 


Member Data Documentation

BinarySearchTree Table::bst [private]
 

Binary search tree that contains the table's items

Definition at line 54 of file TableB.h.

Referenced by traverseTable().

int Table::size [private]
 

Number of items in the table.

Definition at line 56 of file TableB.h.


The documentation for this class was generated from the following files:

Generated on Sun Aug 27 22:04:07 2006 for AWLogo by  doxygen 1.4.6