Sound Design Toolkit 075 Physically informed sound synthesis for everyday sounds

- Main Page
- Modules
- Data Structures
- Files

Typedefs | Functions
SDTStructs.h: Common data structures

## Typedefs
typedef struct SDTHashmap | SDTHashmap
| Opaque data structure for a hashmap object.

## Functions
SDTHashmap * | SDTHashmap_new (int size)
| Object constructor. More...
void | SDTHashmap_free (SDTHashmap *x)
| Object destructor. More...
void * | SDTHashmap_get (SDTHashmap *x, char *key)
| Looks for an entry with the given key in the hashmap. More...
int | SDTHashmap_put (SDTHashmap *x, char *key, void *value)
| Inserts a key/value pair in the hashmap. More...
int | SDTHashmap_del (SDTHashmap *x, char *key)
| Deletes a key/value pair from the hashmap. More...
void | SDTHashmap_clear (SDTHashmap *x)
| Deletes all the entries in the hashmap.

## Detailed Description

## Function Documentation

int SDTHashmap_del | ( | SDTHashmap * | x,
|  | char * | key
| ) |  |

Deletes a key/value pair from the hashmap.

Parameters

  [in] | key | Key to look for in the hashmap

Returns
  0 if deletion is succesful, 1 otherwise (e.g. key not found)

void SDTHashmap_free | ( | SDTHashmap * | x | ) |

Object destructor.

Parameters

  [in] | x | pointer to the instance to destroy

void* SDTHashmap_get | ( | SDTHashmap * | x,
|  | char * | key
| ) |  |

Looks for an entry with the given key in the hashmap.

Parameters

  [in] | key | Key to look for in the hashmap

Returns
  Value associated to the key if found, NULL otherwise

SDTHashmap* SDTHashmap_new | ( | int | size | ) |

Object constructor.

Parameters

  [in] | size | Number of bins in the hashmap

Returns
  Pointer to the new instance

int SDTHashmap_put | ( | SDTHashmap * | x,
|  | char * | key,
|  | void * | value
| ) |  |

Inserts a key/value pair in the hashmap.

Parameters

  [in] | key | Key to associate to the value
  [in] | value | Value to insert in the hashmap

Returns
  0 if insertion is succesful, 1 otherwise (e.g. key already present)