- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Osi-0.98.1/DyLP/src/DylpStdLib/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 Common Public License (CPL).
    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 148 2007-06-09 03:15:30Z 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 *lookup(const char *key, hel *hashtab[], int size),
    00044             *search(const char *key, hel *hashtab[], int size, bool init),
    00045             *enter(const char *key, hel *hashtab[], int size, void *entry),
    00046             *erase(const char *key, hel *hashtab[], int size) ;
    00047
    00048 #endif /* _DYLIB_HASH_H */