Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

hash_link Template Class Reference

Link list of equivalent hash values. More...

#include <hashtable.h>

Inheritance diagram for hash_link:

type_allocator List of all members.

Public Types

typedef type_allocator<T,
__def_link_list>::iterator 
hash_iterator
 If the keyword typename exists for compiler, define the iterator to entries this way.


Public Methods

 hash_link ()
 Initialize the object to not initialized. More...

 hash_link (size_t hv)
 Specify the hash value and hence set link list to initialized.

 hash_link (const T& next, size_t hv)
 Create the link list, initialize the hash value and put specified object onto link list initially.

 hash_link (const T& next)
 Create the link list, initialize the hash value and put specified object onto link list initially.

 hash_link (const hash_link& hl)
 Copy specified link list. More...

hash_link& operator= (const hash_link& hl)
 Make link lists equal. More...

 ~hash_link ()
 Base class destructor releases memory.

size_t getHashvalue () const
 Get the hash value we are using here. More...

hash_iterator insert (const T& next, size_t hv)
 Insert the object onto the link list. More...

hash_iterator insert (const T& next)
void erase (const T& next)
 Erase the specified object if it is on the link list. More...

void erase (hash_iterator p)
 Erase specified iterator on list.

void erase (hash_iterator s, hash_iterator e)
 Erase range of iterators on list.


Detailed Description

template<class T> template class hash_link

Link list of equivalent hash values.


Constructor & Destructor Documentation

template<classT>
hash_link<T>::hash_link<T> ( )
 

Initialize the object to not initialized.

Note, with set_justsize_alloc(), hpux 11 compiler throws an error. this->set_justsize_alloc() works fine. Why? Heaven knows.

template<classT>
hash_link<T>::hash_link<T> ( const hash_link<T> & hl )
 

Copy specified link list.

Parameters:
hl   link list to copy.


Member Function Documentation

template<classT>
hash_link<T> & hash_link<T>::operator= ( const hash_link<T> & hl ) [inline]
 

Make link lists equal.

Parameters:
hl   link list to make equal.
Returns:
reference to this object.

template<classT>
size_t hash_link<T>::getHashvalue ( ) const [inline]
 

Get the hash value we are using here.

Returns:
hash value.

template<classT>
hash_iterator hash_link<T>::insert ( const T & next,
size_t hv ) [inline]
 

Insert the object onto the link list.

Make sure the hash value matches that of link list if the link list has not yet been initialized. If the object is already on the link list, don't put it on the link list again.

Parameters:
next   object to insert onto link list.
hv   object associated with externally calculated hash value.
Returns:
iterator to where object is in link list.

template<classT>
hash_iterator hash_link<T>::insert ( const T & next ) [inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Reimplemented from type_allocator.

template<classT>
void hash_link<T>::erase ( const T & next ) [inline]
 

Erase the specified object if it is on the link list.

Parameters:
next   object to erase.


The documentation for this class was generated from the following file:
Generated at Wed Mar 2 11:17:46 2005 for Result Library by doxygen1.2.0 written by Dimitri van Heesch, © 1997-2000