Nilorea Library

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Macros Groups
Data Structures | Macros | Typedefs | Functions
n_hash.h File Reference
`#include <stdint.h>`
`#include "n_log.h"`
`#include "n_list.h"`
Include dependency graph for n_hash.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures

union | HASH_VALUE
struct | HASH_NODE
struct | HASH_TABLE

## Macros

#define | FORCE_INLINE inline __attribute__((always_inline))
#define | ROTL32(x, y) rotl32(x,y)
#define | BIG_CONSTANT(x) (x##LLU)
#define | HASH_INT 0
#define | HASH_DOUBLE 1
#define | HASH_STRING 2
#define | HASH_PTR 3
#define | HASH_UNKNOWN 4

## Typedefs

typedef struct HASH_NODE | HASH_NODE
typedef struct HASH_TABLE | HASH_TABLE

## Functions

void | MurmurHash3_x86_32 (const void *key, int len, uint32_t seed, void *out)
void | MurmurHash3_x86_128 (const void *key, int len, uint32_t seed, void *out)
char * | ht_node_type (HASH_NODE *node)
| get the type of a node , text version More...
HASH_TABLE * | new_ht (int size)
| Create a hash table with the given size. More...
int | ht_put_int (HASH_TABLE *table, char *key, int val)
| put an integral value with given key in the targeted hash table More...
int | ht_put_double (HASH_TABLE *table, char *key, double val)
| put a double value with given key in the targeted hash table More...
int | ht_put_ptr (HASH_TABLE *table, char *key, void *val, void(*destructor)(void *ptr))
| put a pointer value with given key in the targeted hash table More...
int | ht_put_string (HASH_TABLE *table, char *key, char *val)
| put a null terminated char *string with given key in the targeted hash table More...
HASH_NODE * | ht_get_node (HASH_TABLE *table, char *key)
| return the associated key's node inside the hash_table More...
int | ht_get_int (HASH_TABLE *table, char *key, int *val)
| Retrieve an integral value in the hash table, at the given key. Leave val untouched if key is not found. More...
int | ht_get_double (HASH_TABLE *table, char *key, double *val)
| Retrieve a double value in the hash table, at the given key. Leave val untouched if key is not found. More...
int | ht_get_ptr (HASH_TABLE *table, char *key, void **val)
| Retrieve a pointer value in the hash table, at the given key. Leave val untouched if key is not found. More...
int | ht_get_string (HASH_TABLE *table, char *key, char **val)
| Retrieve a char *string value in the hash table, at the given key. Leave val untouched if key is not found. More...
int | ht_remove (HASH_TABLE *table, char *key)
| Remove a key from a hash table. More...
int | empty_ht (HASH_TABLE *table)
| Empty a hash table. More...
int | destroy_ht (HASH_TABLE **table)
| Free and set the table to NULL. More...

## Detailed Description

Hash functions and table

Author
  Castagnier Mickael

Version
  2.0

Date
  16/03/2015

Definition in file n_hash.h.