libamxc
1.10.3
C Generic Data Containers
|
Ambiorix hash table API implementation. More...
#include <stdlib.h>
#include <string.h>
#include <amxc/amxc_hash.h>
#include <amxc/amxc_htable.h>
#include <amxc/amxc_macros.h>
Go to the source code of this file.
Functions | |
static void | amxc_htable_insert_it (amxc_htable_t *const htable, amxc_htable_it_t *const it) |
static int | amxc_htable_grow (amxc_htable_t *const htable, size_t hint) |
static void | amxc_htable_it_delete_func (amxc_array_it_t *const it) |
int | amxc_htable_new (amxc_htable_t **htable, const size_t reserve) |
Allocates a hash table. More... | |
static int | amxc_htable_cmp_keys (amxc_array_it_t *it1, amxc_array_it_t *it2) |
void | amxc_htable_delete (amxc_htable_t **htable, amxc_htable_it_delete_t func) |
Frees the previously allocated hash table. More... | |
int | amxc_htable_init (amxc_htable_t *const htable, const size_t reserve) |
Initializes a hash table. More... | |
void | amxc_htable_clean (amxc_htable_t *const htable, amxc_htable_it_delete_t func) |
Removes all items from the hash table. More... | |
void | amxc_htable_set_hash_func (amxc_htable_t *const htable, amxc_htable_hash_func_t func) |
Sets the hash function for the hash table. More... | |
unsigned int | amxc_htable_key2index (const amxc_htable_t *const htable, const char *const key) |
Converts a key into an index. More... | |
int | amxc_htable_insert (amxc_htable_t *const htable, const char *const key, amxc_htable_it_t *const it) |
Inserts an item in the hash table. More... | |
amxc_htable_it_t * | amxc_htable_get (const amxc_htable_t *const htable, const char *const key) |
Gets a hash table iterator from the hash table. More... | |
amxc_htable_it_t * | amxc_htable_take (amxc_htable_t *const htable, const char *const key) |
Removes a hash table iterator from the hash table. More... | |
amxc_htable_it_t * | amxc_htable_get_first (const amxc_htable_t *const htable) |
Gets the first item stored in the table. More... | |
amxc_htable_it_t * | amxc_htable_get_last (const amxc_htable_t *const htable) |
Gets the last item stored in the table. More... | |
amxc_array_t * | amxc_htable_get_sorted_keys (const amxc_htable_t *const htable) |
Creates an array containing all keys of the hash table. More... | |
int | amxc_htable_move (amxc_htable_t *const dest, amxc_htable_t *const src) |
Moves all items from one hash table to another hash table. More... | |
Ambiorix hash table API implementation.
Definition in file amxc_htable.c.
|
static |
Definition at line 165 of file amxc_htable.c.
|
static |
Definition at line 85 of file amxc_htable.c.
|
static |
Definition at line 68 of file amxc_htable.c.
|
static |
Definition at line 131 of file amxc_htable.c.