libdict
Data Structure C Library
Loading...
Searching...
No Matches
hashtable.h File Reference
#include "dict.h"
Include dependency graph for hashtable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct hashtable hashtable
 
typedef struct hashtable_itor hashtable_itor
 

Functions

hashtablehashtable_new (dict_compare_func cmp_func, dict_hash_func hash_func, unsigned size)
 
dicthashtable_dict_new (dict_compare_func cmp_func, dict_hash_func hash_func, unsigned size)
 
size_t hashtable_free (hashtable *table, dict_delete_func delete_func)
 
dict_insert_result hashtable_insert (hashtable *table, void *key)
 
void ** hashtable_search (hashtable *table, const void *key)
 
dict_remove_result hashtable_remove (hashtable *table, const void *key)
 
size_t hashtable_clear (hashtable *table, dict_delete_func delete_func)
 
size_t hashtable_traverse (hashtable *table, dict_visit_func visit, void *user_data)
 
size_t hashtable_count (const hashtable *table)
 
size_t hashtable_size (const hashtable *table)
 
size_t hashtable_slots_used (const hashtable *table)
 
bool hashtable_verify (const hashtable *table)
 
bool hashtable_resize (hashtable *table, unsigned size)
 
hashtable_itorhashtable_itor_new (hashtable *table)
 
dict_itorhashtable_dict_itor_new (hashtable *table)
 
void hashtable_itor_free (hashtable_itor *itor)
 
bool hashtable_itor_valid (const hashtable_itor *itor)
 
void hashtable_itor_invalidate (hashtable_itor *itor)
 
bool hashtable_itor_next (hashtable_itor *itor)
 
bool hashtable_itor_prev (hashtable_itor *itor)
 
bool hashtable_itor_nextn (hashtable_itor *itor, size_t count)
 
bool hashtable_itor_prevn (hashtable_itor *itor, size_t count)
 
bool hashtable_itor_first (hashtable_itor *itor)
 
bool hashtable_itor_last (hashtable_itor *itor)
 
bool hashtable_itor_search (hashtable_itor *itor, const void *key)
 
const void * hashtable_itor_key (const hashtable_itor *itor)
 
void ** hashtable_itor_datum (hashtable_itor *itor)
 
bool hashtable_itor_remove (hashtable_itor *itor)
 

Typedef Documentation

◆ hashtable

typedef struct hashtable hashtable

Definition at line 35 of file hashtable.h.

◆ hashtable_itor

typedef struct hashtable_itor hashtable_itor

Definition at line 54 of file hashtable.h.

Function Documentation

◆ hashtable_clear()

size_t hashtable_clear ( hashtable * table,
dict_delete_func delete_func )

Definition at line 251 of file hashtable.c.

◆ hashtable_count()

size_t hashtable_count ( const hashtable * table)

Definition at line 283 of file hashtable.c.

◆ hashtable_dict_itor_new()

dict_itor * hashtable_dict_itor_new ( hashtable * table)

Definition at line 378 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_dict_new()

dict * hashtable_dict_new ( dict_compare_func cmp_func,
dict_hash_func hash_func,
unsigned size )

Definition at line 134 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_free()

size_t hashtable_free ( hashtable * table,
dict_delete_func delete_func )

Definition at line 152 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_insert()

dict_insert_result hashtable_insert ( hashtable * table,
void * key )

Definition at line 163 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_itor_datum()

void ** hashtable_itor_datum ( hashtable_itor * itor)

Definition at line 536 of file hashtable.c.

◆ hashtable_itor_first()

bool hashtable_itor_first ( hashtable_itor * itor)

Definition at line 478 of file hashtable.c.

◆ hashtable_itor_free()

void hashtable_itor_free ( hashtable_itor * itor)

Definition at line 392 of file hashtable.c.

◆ hashtable_itor_invalidate()

void hashtable_itor_invalidate ( hashtable_itor * itor)

Definition at line 404 of file hashtable.c.

◆ hashtable_itor_key()

const void * hashtable_itor_key ( const hashtable_itor * itor)

Definition at line 530 of file hashtable.c.

◆ hashtable_itor_last()

bool hashtable_itor_last ( hashtable_itor * itor)

Definition at line 493 of file hashtable.c.

◆ hashtable_itor_new()

hashtable_itor * hashtable_itor_new ( hashtable * table)

Definition at line 366 of file hashtable.c.

◆ hashtable_itor_next()

bool hashtable_itor_next ( hashtable_itor * itor)

Definition at line 411 of file hashtable.c.

◆ hashtable_itor_nextn()

bool hashtable_itor_nextn ( hashtable_itor * itor,
size_t count )

Definition at line 458 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_itor_prev()

bool hashtable_itor_prev ( hashtable_itor * itor)

Definition at line 433 of file hashtable.c.

◆ hashtable_itor_prevn()

bool hashtable_itor_prevn ( hashtable_itor * itor,
size_t count )

Definition at line 468 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_itor_remove()

bool hashtable_itor_remove ( hashtable_itor * itor)

Definition at line 542 of file hashtable.c.

◆ hashtable_itor_search()

bool hashtable_itor_search ( hashtable_itor * itor,
const void * key )

Definition at line 511 of file hashtable.c.

◆ hashtable_itor_valid()

bool hashtable_itor_valid ( const hashtable_itor * itor)

Definition at line 398 of file hashtable.c.

◆ hashtable_new()

hashtable * hashtable_new ( dict_compare_func cmp_func,
dict_hash_func hash_func,
unsigned size )

Definition at line 111 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_remove()

dict_remove_result hashtable_remove ( hashtable * table,
const void * key )

Definition at line 233 of file hashtable.c.

◆ hashtable_resize()

bool hashtable_resize ( hashtable * table,
unsigned size )

Definition at line 305 of file hashtable.c.

Here is the call graph for this function:

◆ hashtable_search()

void ** hashtable_search ( hashtable * table,
const void * key )

Definition at line 204 of file hashtable.c.

◆ hashtable_size()

size_t hashtable_size ( const hashtable * table)

Definition at line 289 of file hashtable.c.

◆ hashtable_slots_used()

size_t hashtable_slots_used ( const hashtable * table)

Definition at line 295 of file hashtable.c.

◆ hashtable_traverse()

size_t hashtable_traverse ( hashtable * table,
dict_visit_func visit,
void * user_data )

Definition at line 270 of file hashtable.c.

◆ hashtable_verify()

bool hashtable_verify ( const hashtable * table)

Definition at line 345 of file hashtable.c.