Tinyhash
This is a library containing multiple C implementations of hashmap.
|
Go to the source code of this file.
Classes | |
struct | th_iterator_s |
Represents an iterator that allow to iterate over a generic table. More... | |
Typedefs | |
typedef struct th_iterator_s | th_iterator_t |
Represents an iterator that allow to iterate over a generic table. | |
typedef bool(* | th_iterator_next_func_t) (th_iterator_t **) |
Pointer on function that get the next element. | |
Functions | |
th_iterator_t * | th_iterator_create (th_generic_table_t generic_table, th_iterator_next_func_t next) |
Allocate then init a new iterator. | |
void | th_iterator_free (th_iterator_t *it) |
Free an iterator. | |
bool | th_iterator_next (th_iterator_t **ptr) |
Try to get the next element. Free the iterator if it reachs the end. | |
typedef bool(* th_iterator_next_func_t) (th_iterator_t **) |
Pointer on function that get the next element.
Definition at line 24 of file iterator.h.
typedef struct th_iterator_s th_iterator_t |
Represents an iterator that allow to iterate over a generic table.
th_iterator_t * th_iterator_create | ( | th_generic_table_t | generic_table, |
th_iterator_next_func_t | next ) |
Allocate then init a new iterator.
generic_table | |
next |
Definition at line 16 of file iterator.c.
References th_iterator_init().
Referenced by th_oa_iterator_begin(), and th_sc_iterator_begin().
void th_iterator_free | ( | th_iterator_t * | it | ) |
Free an iterator.
it |
Definition at line 29 of file iterator.c.
References th_iterator_init().
Referenced by th_iterator_next().
bool th_iterator_next | ( | th_iterator_t ** | ptr | ) |
Try to get the next element. Free the iterator if it reachs the end.
ptr |
Definition at line 35 of file iterator.c.
References th_iterator_s::next, and th_iterator_free().