ABA_DICTIONARY< KeyType, ItemType > Class Template Reference

data structure dictionary is a collection of items with keys. It provides the operations to insert pairs of keys and items and to look up an item given some key. More...

#include <dictionary.h>

Inheritance diagram for ABA_DICTIONARY< KeyType, ItemType >:

ABA_ABACUSROOT List of all members.

Public Member Functions

void insert (const KeyType &key, const ItemType &item)
ItemType * lookUp (const KeyType &key)

Public Attributes

ABA_DICTIONARYABA_GLOBAL * glob
ABA_DICTIONARYABA_GLOBAL int size

Private Member Functions

 ABA_DICTIONARY (const ABA_DICTIONARY< KeyType, ItemType > &rhs)
const ABA_DICTIONARYoperator= (const ABA_DICTIONARY< KeyType, ItemType > &rhs)

Private Attributes

ABA_GLOBALglob_
ABA_HASH< KeyType, ItemType > hash_

Friends

ostream & operator<< (ostream &out, const ABA_DICTIONARY< KeyType, ItemType > &rhs)
 The output operator writes the hash table implementing the dictionary on an output stream.

Detailed Description

template<class KeyType, class ItemType>
class ABA_DICTIONARY< KeyType, ItemType >

data structure dictionary is a collection of items with keys. It provides the operations to insert pairs of keys and items and to look up an item given some key.

Definition at line 47 of file dictionary.h.


Constructor & Destructor Documentation

template<class KeyType, class ItemType>
ABA_DICTIONARY< KeyType, ItemType >::ABA_DICTIONARY ( const ABA_DICTIONARY< KeyType, ItemType > &  rhs  )  [private]


Member Function Documentation

template<class KeyType, class ItemType>
void ABA_DICTIONARY< KeyType, ItemType >::insert ( const KeyType &  key,
const ItemType &  item 
)

Adds the item together with a key to the dictionary.

Parameters:
key The key of the new item.
item The new item.

template<class KeyType, class ItemType>
ItemType* ABA_DICTIONARY< KeyType, ItemType >::lookUp ( const KeyType &  key  ) 

Returns:
A pointer to the item associated with key in the ABA_DICTIONARY, or 0 if there is no such item.
Parameters:
key The key of the searched item.

template<class KeyType, class ItemType>
const ABA_DICTIONARY& ABA_DICTIONARY< KeyType, ItemType >::operator= ( const ABA_DICTIONARY< KeyType, ItemType > &  rhs  )  [private]


Friends And Related Function Documentation

template<class KeyType, class ItemType>
ostream& operator<< ( ostream &  out,
const ABA_DICTIONARY< KeyType, ItemType > &  rhs 
) [friend]

The output operator writes the hash table implementing the dictionary on an output stream.

Returns:
A reference to the output stream.
Parameters:
out The output stream.
rhs The hash table being output.


Member Data Documentation

template<class KeyType, class ItemType>
ABA_DICTIONARYABA_GLOBAL* ABA_DICTIONARY< KeyType, ItemType >::glob

The constructor.

Parameters:
glob A pointer to the corresponding global object.
size The size of the hash table implementing the dictionary.

Definition at line 55 of file dictionary.h.

template<class KeyType, class ItemType>
ABA_DICTIONARYABA_GLOBAL int ABA_DICTIONARY< KeyType, ItemType >::size

Definition at line 55 of file dictionary.h.

template<class KeyType, class ItemType>
ABA_GLOBAL* ABA_DICTIONARY< KeyType, ItemType >::glob_ [private]

A pointer to the corresponding global object.

Definition at line 86 of file dictionary.h.

template<class KeyType, class ItemType>
ABA_HASH<KeyType, ItemType> ABA_DICTIONARY< KeyType, ItemType >::hash_ [private]

The hash table implementing the dictionary.

Definition at line 90 of file dictionary.h.


The documentation for this class was generated from the following file:
Generated on Tue Aug 14 18:09:56 2007 for ABACUS by  doxygen 1.5.1