1
/* Do not edit this file. It was automatically genarated. */
3
#ifndef HEADER_Hashtable
4
#define HEADER_Hashtable
7
(C) 2004 Hisham H. Muhammad
8
Released under the GNU GPL, see the COPYING file
9
in the source distribution for its full text.
18
typedef struct Hashtable_ Hashtable;
20
typedef void(*HashtablePairFunction)(int, void*);
21
typedef int(*HashtableHashAlgorithm)(Hashtable*, int);
23
typedef struct HashtableItem {
26
struct HashtableItem* next;
31
HashtableItem** buckets;
33
HashtableHashAlgorithm hashAlgorithm;
37
HashtableItem* HashtableItem_new(int key, void* value);
39
Hashtable* Hashtable_new(int size, bool owner);
41
int Hashtable_hashAlgorithm(Hashtable* this, int key);
43
void Hashtable_delete(Hashtable* this);
45
int Hashtable_size(Hashtable* this);
47
void Hashtable_put(Hashtable* this, int key, void* value);
49
void* Hashtable_remove(Hashtable* this, int key);
51
void* Hashtable_get(Hashtable* this, int key);
53
void Hashtable_foreach(Hashtable* this, HashtablePairFunction f);