Sound Design Toolkit  078
Physically informed sound synthesis for everyday sounds
SDTStructs.h
1 
5 #ifndef SDT_STRUCTS_H
6 #define SDT_STRUCTS_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
13 typedef struct SDTHashmap SDTHashmap;
14 
18 extern SDTHashmap *SDTHashmap_new(int size);
19 
22 extern void SDTHashmap_free(SDTHashmap *x);
23 
27 extern void *SDTHashmap_get(SDTHashmap *x, char *key);
28 
33 extern int SDTHashmap_put(SDTHashmap *x, char *key, void *value);
34 
38 extern int SDTHashmap_del(SDTHashmap *x, char *key);
39 
41 extern void SDTHashmap_clear(SDTHashmap *x);
42 
43 #ifdef __cplusplus
44 };
45 #endif
46 
47 #endif
48 
int SDTHashmap_put(SDTHashmap *x, char *key, void *value)
Inserts a key/value pair in the hashmap.
struct SDTHashmap SDTHashmap
Opaque data structure for a hashmap object.
Definition: SDTStructs.h:13
SDTHashmap * SDTHashmap_new(int size)
Object constructor.
void * SDTHashmap_get(SDTHashmap *x, char *key)
Looks for an entry with the given key in the hashmap.
void SDTHashmap_free(SDTHashmap *x)
Object destructor.
int SDTHashmap_del(SDTHashmap *x, char *key)
Deletes a key/value pair from the hashmap.
void SDTHashmap_clear(SDTHashmap *x)
Deletes all the entries in the hashmap.