Main Page   Data Structures   File List   Data Fields   Globals   Related Pages  

xhash_tmpl_c.inc File Reference

data type independant hash table template (external hashing). More...

#include "common.h"
#include <stdlib.h>
#include <sys/types.h>
#include <assert.h>
#include "xmalloc.h"
#include "xhash_tmpl_h.inc"
#include "mlist_tmpl_h.inc"
#include "mlist_tmpl_c.inc"

Include dependency graph for xhash_tmpl_c.inc:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.


Detailed Description

data type independant hash table template (external hashing).

This module contains a data type independant hash table (external hashing) template. It can easily be customized for new data types by defining XH_TABLE_NAME, which becomes the name of the new has-table "class", XH_FUNC_PFX, which is prepended to all function names listed below, XH_KEY which must expand to the table's keys data type and XH_CARGO which specifies the actual data type to be stored.
In case the hash table should store a non-integral data type like a struct, the macro ML_INVALID must be defined whose value is returned as an error indicator by functions returning an MlCargo object. If undefined ML_INVALID is set to 0L which should be a reasonable default in many cases.
Following things can be defined optionally:

This can be done using a tiny adapter file, see chrlist.[ch] for an example.
All adapted list classes will benefit automatically and without any modification from bug fixes, improvements or new functions in this template.

Definition in file xhash_tmpl_c.inc.


Generated on Fri Jan 25 22:41:02 2002 for PDepp Webserver by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001