FTEQW
Documentation of the FTE engine source tree.
hash.h File Reference

Go to the source code of this file.

Classes

struct  bucket_s
 
struct  hashtable_s
 

Typedefs

typedef struct bucket_s bucket_t
 
typedef struct hashtable_s hashtable_t
 

Functions

void Hash_InitTable (hashtable_t *table, unsigned int numbucks, void *mem)
 
voidHash_Enumerate (hashtable_t *table, void(*callback)(void *ctx, void *data), void *ctx)
 
unsigned int Hash_Key (const char *name, unsigned int modulus)
 
voidHash_GetIdx (hashtable_t *table, unsigned int idx)
 
voidHash_Get (hashtable_t *table, const char *name)
 
voidHash_GetInsensitive (hashtable_t *table, const char *name)
 
voidHash_GetInsensitiveBucket (hashtable_t *table, const char *name)
 
voidHash_GetKey (hashtable_t *table, unsigned int key)
 
voidHash_GetNext (hashtable_t *table, const char *name, void *old)
 
voidHash_GetNextInsensitive (hashtable_t *table, const char *name, void *old)
 
voidHash_GetNextKey (hashtable_t *table, unsigned int key, void *old)
 
voidHash_Add (hashtable_t *table, const char *name, void *data, bucket_t *buck)
 
voidHash_AddInsensitive (hashtable_t *table, const char *name, void *data, bucket_t *buck)
 
void Hash_Remove (hashtable_t *table, const char *name)
 
void Hash_RemoveData (hashtable_t *table, const char *name, void *data)
 
void Hash_RemoveDataInsensitive (hashtable_t *table, const char *name, void *data)
 
void Hash_RemoveBucket (hashtable_t *table, const char *name, bucket_t *data)
 
void Hash_RemoveKey (hashtable_t *table, unsigned int key)
 
void Hash_RemoveDataKey (hashtable_t *table, unsigned int key, void *data)
 
voidHash_AddKey (hashtable_t *table, unsigned int key, void *data, bucket_t *buck)
 

Typedef Documentation

◆ bucket_t

typedef struct bucket_s bucket_t

◆ hashtable_t

typedef struct hashtable_s hashtable_t

Function Documentation

◆ Hash_Add()

void * Hash_Add ( hashtable_t table,
const char *  name,
void data,
bucket_t buck 
)

◆ Hash_AddInsensitive()

void * Hash_AddInsensitive ( hashtable_t table,
const char *  name,
void data,
bucket_t buck 
)

◆ Hash_AddKey()

void * Hash_AddKey ( hashtable_t table,
unsigned int  key,
void data,
bucket_t buck 
)

◆ Hash_Enumerate()

void * Hash_Enumerate ( hashtable_t table,
void(*)(void *ctx, void *data callback,
void ctx 
)

◆ Hash_Get()

void * Hash_Get ( hashtable_t table,
const char *  name 
)

◆ Hash_GetIdx()

void * Hash_GetIdx ( hashtable_t table,
unsigned int  idx 
)

◆ Hash_GetInsensitive()

void * Hash_GetInsensitive ( hashtable_t table,
const char *  name 
)

◆ Hash_GetInsensitiveBucket()

void * Hash_GetInsensitiveBucket ( hashtable_t table,
const char *  name 
)

◆ Hash_GetKey()

void * Hash_GetKey ( hashtable_t table,
unsigned int  key 
)

◆ Hash_GetNext()

void * Hash_GetNext ( hashtable_t table,
const char *  name,
void old 
)

◆ Hash_GetNextInsensitive()

void * Hash_GetNextInsensitive ( hashtable_t table,
const char *  name,
void old 
)

◆ Hash_GetNextKey()

void * Hash_GetNextKey ( hashtable_t table,
unsigned int  key,
void old 
)

◆ Hash_InitTable()

void Hash_InitTable ( hashtable_t table,
unsigned int  numbucks,
void mem 
)

◆ Hash_Key()

unsigned int Hash_Key ( const char *  name,
unsigned int  modulus 
)

◆ Hash_Remove()

void Hash_Remove ( hashtable_t table,
const char *  name 
)

◆ Hash_RemoveBucket()

void Hash_RemoveBucket ( hashtable_t table,
const char *  name,
bucket_t data 
)

◆ Hash_RemoveData()

void Hash_RemoveData ( hashtable_t table,
const char *  name,
void data 
)

◆ Hash_RemoveDataInsensitive()

void Hash_RemoveDataInsensitive ( hashtable_t table,
const char *  name,
void data 
)

◆ Hash_RemoveDataKey()

void Hash_RemoveDataKey ( hashtable_t table,
unsigned int  key,
void data 
)

◆ Hash_RemoveKey()

void Hash_RemoveKey ( hashtable_t table,
unsigned int  key 
)