xine-lib: xine-lib-1.2.12/src/post/goom/goomsl_hash.h Source File

xine-lib 1.2.12

goomsl_hash.h
Go to the documentation of this file.
1#ifndef _GOOMSL_HASH_H
2#define _GOOMSL_HASH_H
3
4 typedef struct GOOM_HASH_ENTRY GoomHashEntry;
5 typedef struct GOOM_HASH GoomHash;
6
7 typedef union {
8 void *ptr;
9 int i;
10 float f;
11} HashValue;
12
13 struct GOOM_HASH_ENTRY {
14 char *key;
15 HashValue value;
16 GoomHashEntry *lower;
17 GoomHashEntry *upper;
18};
19
20 struct GOOM_HASH {
21 GoomHashEntry *root;
22 int number_of_puts;
23};
24
25 GoomHash *goom_hash_new(void);
26void goom_hash_free(GoomHash *gh);
27
28void goom_hash_put(GoomHash *gh, const char *key, HashValue value);
29 HashValue *goom_hash_get(GoomHash *gh, const char *key);
30
31void goom_hash_put_int (GoomHash *_this, const char *key, int i);
32void goom_hash_put_float(GoomHash *_this, const char *key, float f);
33void goom_hash_put_ptr (GoomHash *_this, const char *key, void *ptr);
34
35 typedef void (*GH_Func)(GoomHash *caller, const char *key, HashValue *value);
36
37void goom_hash_for_each(GoomHash *_this, GH_Func func);
38int goom_hash_number_of_puts(GoomHash *_this);
39
40#endif /* _GOOM_HASH_H */
goom_hash_free
void goom_hash_free(GoomHash *gh)
Definition: goomsl_hash.c:72
goom_hash_put
void goom_hash_put(GoomHash *gh, const char *key, HashValue value)
Definition: goomsl_hash.c:77
goom_hash_number_of_puts
int goom_hash_number_of_puts(GoomHash *_this)
Definition: goomsl_hash.c:122
goom_hash_new
GoomHash * goom_hash_new(void)
Definition: goomsl_hash.c:65
goom_hash_put_ptr
void goom_hash_put_ptr(GoomHash *_this, const char *key, void *ptr)
Definition: goomsl_hash.c:102
goom_hash_put_float
void goom_hash_put_float(GoomHash *_this, const char *key, float f)
Definition: goomsl_hash.c:96
goom_hash_get
HashValue * goom_hash_get(GoomHash *gh, const char *key)
Definition: goomsl_hash.c:85
GH_Func
void(* GH_Func)(GoomHash *caller, const char *key, HashValue *value)
Definition: goomsl_hash.h:35
goom_hash_for_each
void goom_hash_for_each(GoomHash *_this, GH_Func func)
Definition: goomsl_hash.c:118
goom_hash_put_int
void goom_hash_put_int(GoomHash *_this, const char *key, int i)
Definition: goomsl_hash.c:90
GOOM_HASH_ENTRY
Definition: goomsl_hash.h:13
GOOM_HASH_ENTRY::lower
GoomHashEntry * lower
Definition: goomsl_hash.h:16
GOOM_HASH_ENTRY::upper
GoomHashEntry * upper
Definition: goomsl_hash.h:17
GOOM_HASH_ENTRY::value
HashValue value
Definition: goomsl_hash.h:15
GOOM_HASH_ENTRY::key
char * key
Definition: goomsl_hash.h:14
GOOM_HASH
Definition: goomsl_hash.h:20
GOOM_HASH::number_of_puts
int number_of_puts
Definition: goomsl_hash.h:22
GOOM_HASH::root
GoomHashEntry * root
Definition: goomsl_hash.h:21
HashValue
Definition: goomsl_hash.h:7
HashValue::i
int i
Definition: goomsl_hash.h:9
HashValue::f
float f
Definition: goomsl_hash.h:10
HashValue::ptr
void * ptr
Definition: goomsl_hash.h:8
key
char key[16]
Definition: xine_speex_decoder.c:94