Tinyhash
This is a library containing multiple C implementations of hashmap.
Loading...
Searching...
No Matches
iterator.h
Go to the documentation of this file.
1#ifndef __TINYHASH_COMMON_ITERATOR_H__
2#define __TINYHASH_COMMON_ITERATOR_H__
3
4#include "key.h"
5#include "types.h"
6
19
25
35
42
52
53#endif
bool th_iterator_next(th_iterator_t **ptr)
Try to get the next element. Free the iterator if it reachs the end.
Definition iterator.c:35
void th_iterator_free(th_iterator_t *it)
Free an iterator.
Definition iterator.c:29
bool(* th_iterator_next_func_t)(th_iterator_t **)
Pointer on function that get the next element.
Definition iterator.h:24
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.
Definition iterator.c:16
Represents an iterator that allow to iterate over a generic table.
Definition iterator.h:11
th_any_t current
Definition iterator.h:13
th_any_t value
Definition iterator.h:15
th_generic_table_t generic_table
Definition iterator.h:16
bool(* next)(struct th_iterator_s **)
Definition iterator.h:17
th_key_t * key
Definition iterator.h:14
Represent an entry key.
Definition key.h:14
void * th_generic_table_t
Represents any table.
Definition types.h:14
void * th_any_t
Represent any type of data.
Definition types.h:8