altEngine
Main Page
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
hashtable.h
Go to the documentation of this file.
1
#include "
include.h
"
2
3
#ifndef HASHTABLE_H
4
#define HASHTABLE_H
5
6
7
typedef
struct
8
{
9
char
*
key
;
10
void
*
value
;
11
}
hashnode_t
;
12
13
#define TABLE_SIZE 256
14
15
class
HashTable
16
{
17
public
:
18
HashTable
();
19
void
insert
(
char
*key,
char
*value);
20
void
*
find
(
const
char
*key)
const
;
21
bool
update
(
const
char
*key,
char
*value);
22
void
destroy
();
23
private
:
24
int
hash
(
const
char
*key,
int
i)
const
;
25
int
hash_djb2
(
const
char
*key)
const
;
26
int
hash_sdbm
(
const
char
*key)
const
;
27
hashnode_t
*
table
[
TABLE_SIZE
];
28
};
29
30
#endif
Generated on Tue Nov 21 2017 19:18:54 for altEngine by
1.8.2