My Project
bld
coinor-dylp-1.6.0
DyLP
src
DylpStdLib
dylib_hash.h
Go to the documentation of this file.
1
#ifndef _DYLIB_HASH_H
2
#define _DYLIB_HASH_H
3
/*
4
This file is part of the support library for the Dylp LP distribution.
5
6
Copyright (C) 2005 -- 2007 Lou Hafer
7
8
School of Computing Science
9
Simon Fraser University
10
Burnaby, B.C., V5A 1S6, Canada
11
lou@cs.sfu.ca
12
13
This code is licensed under the terms of the Common Public License (CPL).
14
*/
15
16
/* Hash Table Structures */
17
18
/*
19
In order that the hashing routines can be used for a number of different
20
tables, they do not have any knowledge of the thing being hashed. All that
21
is maintained is the association between a key and some generic object.
22
23
@(#)hash.h 1.3 06/22/04
24
svn/cvs: $Id: dylib_hash.h 148 2007-06-09 03:15:30Z lou $
25
*/
26
27
/*
28
The basic hash table entry structure
29
30
field description
31
----- -----------
32
next next entry at this bucket
33
key hash key (character string)
34
ent structure associated with this entry
35
*/
36
37
typedef
struct
hel_tag
{
struct
hel_tag
*
next
;
38
const
char
*
key
;
39
void
*
ent
; }
hel
;
40
41
/* Hash table interface routines */
42
43
extern
void
*
lookup
(
const
char
*
key
,
hel
*hashtab[],
int
size),
44
*
search
(
const
char
*
key
,
hel
*hashtab[],
int
size,
bool
init),
45
*
enter
(
const
char
*
key
,
hel
*hashtab[],
int
size,
void
*entry),
46
*
erase
(
const
char
*
key
,
hel
*hashtab[],
int
size) ;
47
48
#endif
/* _DYLIB_HASH_H */
hel
struct hel_tag hel
hel_tag
Definition:
dylib_hash.h:37
hel_tag::ent
void * ent
Definition:
dylib_hash.h:39
erase
void * erase(const char *key, hel *hashtab[], int size)
enter
void * enter(const char *key, hel *hashtab[], int size, void *entry)
hel_tag::key
const char * key
Definition:
dylib_hash.h:38
search
void * search(const char *key, hel *hashtab[], int size, bool init)
hel_tag::next
struct hel_tag * next
Definition:
dylib_hash.h:37
lookup
void * lookup(const char *key, hel *hashtab[], int size)
Generated by
1.8.20