MHash< T > Class Template Reference

Mercury Hash Table for Strings. More...

#include <MercuryVector.h>

Inheritance diagram for MHash< T >:

Inheritance graph
[legend]
Collaboration diagram for MHash< T >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MHash ()
 MHash (const MHash &rhs)
MHashoperator= (const MHash &rhs)
void resize (int iNewSize)
 ~MHash ()
void clear ()
T & operator[] (const MString &pIndex)
 Return reference to data in the index's cell, if no data exists, it is generated.
void insert (const MString &pIndex, const T &pData)
 Insert pData into pIndex's cell.
T * get (const MString &pIndex)
 Get pointer to pIndex's cell, if no data exists, NULL is returned.
bool remove (const MString &pIndex)
void VectorIndicies (MVector< MString > &vOut)

Private Attributes

MHashNode< T > ** m_pTable
m_pNil
unsigned int m_iSize
unsigned int m_iPrimest
unsigned int m_iCount

Classes

struct  MHashNode

Detailed Description

template<typename T>
class MHash< T >

Mercury Hash Table for Strings.

Definition at line 436 of file MercuryVector.h.


Constructor & Destructor Documentation

template<typename T>
MHash< T >::MHash (  )  [inline]

Definition at line 439 of file MercuryVector.h.

template<typename T>
MHash< T >::MHash ( const MHash< T > &  rhs  )  [inline]

Definition at line 446 of file MercuryVector.h.

template<typename T>
MHash< T >::~MHash (  )  [inline]

Definition at line 513 of file MercuryVector.h.


Member Function Documentation

template<typename T>
MHash& MHash< T >::operator= ( const MHash< T > &  rhs  )  [inline]

Definition at line 466 of file MercuryVector.h.

template<typename T>
void MHash< T >::resize ( int  iNewSize  )  [inline]

Definition at line 487 of file MercuryVector.h.

template<typename T>
void MHash< T >::clear (  )  [inline]

Definition at line 525 of file MercuryVector.h.

template<typename T>
T& MHash< T >::operator[] ( const MString pIndex  )  [inline]

Return reference to data in the index's cell, if no data exists, it is generated.

Definition at line 541 of file MercuryVector.h.

template<typename T>
void MHash< T >::insert ( const MString pIndex,
const T &  pData 
) [inline]

Insert pData into pIndex's cell.

Definition at line 568 of file MercuryVector.h.

template<typename T>
T* MHash< T >::get ( const MString pIndex  )  [inline]

Get pointer to pIndex's cell, if no data exists, NULL is returned.

Definition at line 578 of file MercuryVector.h.

template<typename T>
bool MHash< T >::remove ( const MString pIndex  )  [inline]

Definition at line 592 of file MercuryVector.h.

template<typename T>
void MHash< T >::VectorIndicies ( MVector< MString > &  vOut  )  [inline]

Definition at line 618 of file MercuryVector.h.


Member Data Documentation

template<typename T>
MHashNode<T>** MHash< T >::m_pTable [private]

Definition at line 645 of file MercuryVector.h.

template<typename T>
T MHash< T >::m_pNil [private]

Definition at line 646 of file MercuryVector.h.

template<typename T>
unsigned int MHash< T >::m_iSize [private]

Definition at line 647 of file MercuryVector.h.

template<typename T>
unsigned int MHash< T >::m_iPrimest [private]

Definition at line 648 of file MercuryVector.h.

template<typename T>
unsigned int MHash< T >::m_iCount [private]

Definition at line 649 of file MercuryVector.h.


The documentation for this class was generated from the following file:
Hosted by SourceForge.net Logo