Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

dsHashTableGeneric Class Reference

#include <dsHashTable.h>

Inheritance diagram for dsHashTableGeneric:

dsDataAccessor dsHashTable List of all members.

Public Methods

 dsHashTableGeneric (int numEntries, DACleanupMode purge=cmPURGE)
virtual ~dsHashTableGeneric ()
virtual void * insert (void *a, bool replace=false)
virtual void * remove (void *a)
virtual void * seek (void *a)
void clear ()
void * walk (int i)
int HSize (void)
int NumEntries (void)

Protected Types

enum  DACleanupMode { cmPASSIVE, cmPURGE }

Protected Methods

virtual int cf (void *a, void *b)=0
virtual int primary_hash_func (void *a)=0
virtual int secondary_hash_func (void *a)=0
virtual void * walk ()

Protected Attributes

DACleanupMode _purge

Member Enumeration Documentation

enum dsDataAccessor::DACleanupMode [protected, inherited]

Enumeration values:
cmPASSIVE  don't delete data body
cmPURGE  delete data body on replace or cleanup

Constructor & Destructor Documentation

dsHashTableGeneric::dsHashTableGeneric int    numEntries,
DACleanupMode    purge = cmPURGE

Create object instance

  • numEntries initial table size

dsHashTableGeneric::~dsHashTableGeneric   [virtual]

Member Function Documentation

virtual int dsHashTableGeneric::cf void *    a,
void *    b
[protected, pure virtual]

Implemented in dsHashTable.

void dsHashTableGeneric::clear  

Reinit table, keep current size

int dsHashTableGeneric::HSize void    [inline]

Function returns curren table size

void * dsHashTableGeneric::insert void *    a,
bool    replace = false

Insert object a into data storage, if replace flag is set existing object will be replaced. Return pointer to existsing object or NULL if new object was inserted.

Implements dsDataAccessor.

int dsHashTableGeneric::NumEntries void    [inline]

Function returns number of non-empty records in the table

virtual int dsHashTableGeneric::primary_hash_func void *    a [protected, pure virtual]

Implemented in dsHashTable.

void * dsHashTableGeneric::remove void *    a [virtual]

Remove object a from data storage. Return pointer to removed object or NULL if object doesn't exist

Implements dsDataAccessor.

virtual int dsHashTableGeneric::secondary_hash_func void *    a [protected, pure virtual]

Implemented in dsHashTable.

void * dsHashTableGeneric::seek void *    a [virtual]

Find object matching a in tree and return pointer to found one or NULL if seek can't be done.

Implements dsDataAccessor.

virtual void* dsDataAccessor::walk   [inline, protected, virtual, inherited]

Walk throuph storage behavioure details depends of storage nature

void * dsHashTableGeneric::walk int    i [inline]

Function returns table i'th table record even it is empty

Member Data Documentation

DACleanupMode dsDataAccessor::_purge [protected, inherited]

Cleanup mode flag. See DACleanupMode

The documentation for this class was generated from the following files:
Generated on Mon May 16 18:27:00 2005 for libdms4 by doxygen1.3-rc2