1 |
/* |
/* ASCEND modelling environment |
2 |
* Table Module |
Copyright (C) 2006 Carnegie Mellon University |
3 |
* by Kirk A. Abbott |
Copyright (C) 1994 Kirk Andre Abbott |
4 |
* Created December 29, 1994. |
|
5 |
* Version: $Revision: 1.3 $ |
This program is free software; you can redistribute it and/or modify |
6 |
* Version control file: $RCSfile: table.h,v $ |
it under the terms of the GNU General Public License as published by |
7 |
* Date last modified: $Date: 1998/06/16 15:47:47 $ |
the Free Software Foundation; either version 2, or (at your option) |
8 |
* Last modified by: $Author: mthomas $ |
any later version. |
9 |
* |
|
10 |
* This file is part of the Ascend Language Interpreter. |
This program is distributed in the hope that it will be useful, |
11 |
* |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
* Copyright (C) 1994 Kirk Andre Abbott |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
* |
GNU General Public License for more details. |
14 |
* The Ascend Language Interpreter is free software; you can |
|
15 |
* redistribute it and/or modify it under the terms of the GNU |
You should have received a copy of the GNU General Public License |
16 |
* General Public License as published by the Free Software |
along with this program; if not, write to the Free Software |
17 |
* Foundation; either version 2 of the License, or (at your option) |
Foundation, Inc., 59 Temple Place - Suite 330, |
18 |
* any later version. |
Boston, MA 02111-1307, USA. |
19 |
* |
*//** @file |
20 |
* The Ascend Language Interpreter is distributed in hope that it |
Hash Table Module. |
21 |
* will be useful, but WITHOUT ANY WARRANTY; without even the implied |
|
22 |
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
Many hash tables are used throughout the implementation of a compiler |
23 |
* See the GNU General Public License for more details. |
and/or interpreter. This module (in the spirit of the list module) |
24 |
* |
attempts to provide a generic table implementation, based on the classic |
25 |
* You should have received a copy of the GNU General Public License |
*bucket and chains* for resolving collisions. Nothing fancy is done, |
26 |
* along with the program; if not, write to the Free Software |
except that we cache a ptr to the last thing found, so that access to |
27 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139 USA. Check |
it if required is fast. We append the new element to the front of the |
28 |
* the file named COPYING. |
chain. The hashpjw algorithm is used. |
29 |
*/ |
|
30 |
|
This module is appropriate for hash tables keyed with arbitrary strings. |
31 |
/** @file |
It is not appropriate for use with symbol table entry keys. |
32 |
* Hash Table Module. |
|
33 |
* |
Requires: |
34 |
* Many hash tables are used throughout the implementation of a compiler |
#include "utilities/ascConfig.h" |
35 |
* and/or interpreter. This module (in the spirit of the list module) |
*//* |
36 |
* attempts to provide a generic table implementation, based on the classic |
by Kirk A. Abbott |
37 |
* *bucket and chains* for resolving collisions. Nothing fancy is done, |
Created December 29, 1994. |
38 |
* except that we cache a ptr to the last thing found, so that access to |
Last in CVS $Revision: 1.3 $ $Date: 1998/06/16 15:47:47 $ $Author: mthomas $ |
39 |
* it if required is fast. We append the new element to the front of the |
*/ |
|
* chain. The hashpjw algorithm is used.<br><br> |
|
|
* |
|
|
* This module is appropriate for hash tables keyed with arbitrary strings. |
|
|
* It is not appropriate for use with symbol table entry keys. |
|
|
* <pre> |
|
|
* Requires: |
|
|
* #include "utilities/ascConfig.h" |
|
|
* </pre> |
|
|
*/ |
|
40 |
|
|
41 |
#ifndef __table_h_seen__ |
#ifndef ASC_TABLE_H |
42 |
#define __table_h_seen__ |
#define ASC_TABLE_H |
43 |
|
|
44 |
typedef void (*TableIteratorOne)(void *); |
typedef void (*TableIteratorOne)(void *); |
45 |
/**< |
/**< |
216 |
* @param table Pointer to the hash table to query (non-NULL). |
* @param table Pointer to the hash table to query (non-NULL). |
217 |
*/ |
*/ |
218 |
|
|
219 |
#endif /* __table_h_seen__ */ |
#endif /* ASC_TABLE_H */ |
|
|
|