text cover

Data Abstraction and Problem Solving with C++

Walls and Mirrors

by Frank M. Carrano

Addison Wesley Logo

HashTable Class Reference

#include <TableH.h>

List of all members.


Detailed Description

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

Definition at line 28 of file TableH.h.

Public Member Functions

 HashTable ()
 HashTable (const HashTable &table)
virtual ~HashTable ()
virtual bool tableIsEmpty () const
virtual int tableGetLength () 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)

Protected Member Functions

int hashIndex (KeyType searchKey) const

Private Types

typedef ChainNodeHashTableType [HASH_TABLE_SIZE]

Private Attributes

HashTableType table
int size

Static Private Attributes

static const int HASH_TABLE_SIZE = 101


Member Typedef Documentation

typedef ChainNode* HashTable::HashTableType[HASH_TABLE_SIZE] [private]
 

Definition at line 54 of file TableH.h.


Constructor & Destructor Documentation

HashTable::HashTable  ) 
 

HashTable::HashTable const HashTable table  ) 
 

virtual HashTable::~HashTable  )  [virtual]
 


Member Function Documentation

virtual bool HashTable::tableIsEmpty  )  const [virtual]
 

virtual int HashTable::tableGetLength  )  const [virtual]
 

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

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

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

int HashTable::hashIndex KeyType  searchKey  )  const [protected]
 

Hash function.


Member Data Documentation

const int HashTable::HASH_TABLE_SIZE = 101 [static, private]
 

Size of hash table.

Definition at line 53 of file TableH.h.

HashTableType HashTable::table [private]
 

Hash table.

Definition at line 57 of file TableH.h.

int HashTable::size [private]
 

Size of ADT table.

Definition at line 59 of file TableH.h.


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

Generated on Sun Aug 27 22:18:13 2006 for AWLogo by  doxygen 1.4.6