# dylib_hash.h

Go to the documentation of this file.

    00001 #ifndef _DYLIB_HASH_H
    00002 #define _DYLIB_HASH_H
    00003 /*
    00004   This file is part of the support library for the Dylp LP distribution.
    00005
    00006         Copyright (C) 2005 -- 2007 Lou Hafer
    00007
    00008         School of Computing Science
    00009         Simon Fraser University
    00010         Burnaby, B.C., V5A 1S6, Canada
    00011         lou@cs.sfu.ca
    00012
    00013   This code is licensed under the terms of the Eclipse Public License (EPL).
    00014 */
    00015
    00016 /*                Hash Table Structures                 */
    00017
    00018 /*
    00019   In order that the hashing routines can be used for a number of different
    00020   tables, they do not have any knowledge of the thing being hashed. All that
    00021   is maintained is the association between a key and some generic object.
    00022
    00023   @(#)hash.h    1.3 06/22/04
    00024   svn/cvs: $Id: dylib_hash.h 407 2010-12-31 20:48:48Z lou $
    00025 */
    00026
    00027 /*
    00028   The basic hash table entry structure
    00029
    00030   field         description
    00031   -----         -----------
    00032   next          next entry at this bucket
    00033   key           hash key (character string)
    00034   ent           structure associated with this entry
    00035 */
    00036
    00037 typedef struct hel_tag { struct hel_tag *next ;
    00038                          const char *key ;
    00039                          void *ent ; } hel ;
    00040
    00041 /* Hash table interface routines */
    00042
    00043 extern void *dyhash_lookup(const char *key, hel *hashtab[], int size),
    00044             *dyhash_search(const char *key, hel *hashtab[],
    00045                            int size, bool init),
    00046             *dyhash_enter(const char *key, hel *hashtab[],
    00047                           int size, void *entry),
    00048             *dyhash_erase(const char *key, hel *hashtab[], int size) ;
    00049
    00050 #endif /* _DYLIB_HASH_H */

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines