#include <gel/common.h>
#include <gel/types.h>
Go to the source code of this file.
|
| gel_list_t | gel_list_new (void) |
| |
| void | gel_list_first (gel_list_t desc) |
| |
| int | gel_list_end (gel_list_t desc) |
| |
| void * | gel_list_get (gel_list_t desc) |
| |
| int | gel_list_contains (gel_list_t desc, void *val) |
| |
| int | gel_list_add (gel_list_t desc, void *val) |
| |
| int | gel_list_remove (gel_list_t desc, void *val) |
| |
| void | gel_list_clear (gel_list_t desc) |
| |
| void | gel_list_delete (gel_list_t desc) |
| |
| void | gel_list_delete_items (gel_list_t desc, void(*free)(void *)) |
| |
| int | gel_list_length (gel_list_t desc) |
| |
| int | gel_list_empty (gel_list_t a) |
| |
| gel_hash_t | gel_hash_new (int size) |
| |
| int | hash_put (gel_hash_t hash, char *key, void *value) |
| |
| void * | hash_get (gel_hash_t hash, char *key) |
| |
| int | hash_del (gel_hash_t hash, char *key) |
| |
| void | hash_free (gel_hash_t hash) |
| |
| gel_enum_t * | hash_enum (gel_hash_t h) |
| |
| void | hash_enum_free (gel_enum_t *en) |
| |
| void * | gel_hash_enum_init (gel_hash_enum_t *en, gel_hash_t htab) |
| |
| void * | gel_hash_enum_next (gel_hash_enum_t *en) |
| |
| void | gel_hash_enum_end (gel_hash_enum_t *en, gel_hash_t htab) |
| |
◆ gel_hash_key
| #define gel_hash_key |
( |
|
en | ) |
((en)->item->key) |
◆ gel_hash_value
| #define gel_hash_value |
( |
|
en | ) |
((en)->item->value) |
◆ gel_hash_enum_t
Type of fast enumerator on an hash table.
◆ gel_hash_t
◆ gel_list_t
| typedef typedef__BEGIN_DECLS struct descripteur* gel_list_t |
◆ item_t
◆ gel_hash_enum_end()
Initialize the hash enumerator to point past the end of the enumeration.
- Parameters
-
| en | Enumerator to initialize. |
| hash | Hash table. |
◆ gel_hash_enum_init()
Initialize an hash table enumerator.
- Parameters
-
| en | Enumerator to initialize. |
| htab | Hash table to traverse. |
- Returns
- First item value or null if the has table is empty.
◆ gel_hash_enum_next()
Go to the next item in the hash table.
- Parameters
-
- Returns
- Value of the next item or null if there is no item.
◆ gel_hash_new()
Create an hash table.
- Parameters
-
| size | Size of the hash table (prime numbers gives better results). |
- Returns
- Create hash table or null.
◆ hash_del()
Supprime un element de la table de hachage
- Parameters
-
| hash | La table de hachage |
| key | La cle return Code d'erreur |
◆ hash_enum()
Renvoie une enumeration a partir d'une table de hachage
- Parameters
-
- Returns
- Une enumeration de la table de hachage
◆ hash_enum_free()
Implementation de enum_free pour les tables de hachage Libere l'enumeration
- Parameters
-
◆ hash_free()
Libere une table de hachage
- Parameters
-
◆ hash_get()
Recupere une valeur de la table de hachage
- Parameters
-
| key | La cle |
| hash | La table de hachage |
- Returns
- La valeur, ou NULL
◆ hash_put()
| int hash_put |
( |
gel_hash_t |
hash, |
|
|
char * |
key, |
|
|
void * |
value |
|
) |
| |
Rentre un couple (cle,valeur) dans la table de hachage
- Parameters
-
| hash | La table de hachage |
| key | La cle |
| value | La valeur |
- Returns
- Code d'erreur