TuyaOS
hashmap.h
浏览该文件的文档.
1
11#ifndef __HASHMAP_H__
12#define __HASHMAP_H__
13
14#include "tuya_hashmap.h"
15
16#ifdef __cplusplus
17extern "C" {
18#endif
19
20typedef MAP_T map_t;
21typedef ANY_T any_t;
22typedef ANY_T_ITER any_t_iter;
23
30#define hashmap_new(table_size) tuya_hashmap_new(table_size)
31
32
43#define hashmap_put(in, key , data) tuya_hashmap_put(in, key , data)
44
53#define hashmap_get(in, key, arg) tuya_hashmap_get(in, key, arg)
54
65#define hashmap_data_traversal(in, key, arg_iterator) tuya_hashmap_data_traversal(in, key, arg_iterator)
66
71#define HASHMAP_FOR_EACH_DATA(in, key, data_iter) TUYA_HASHMAP_FOR_EACH_DATA(in, key, data_iter)
72
83#define hashmap_remove(in, key, data) tuya_hashmap_remove(in, key, data)
84
92#define hashmap_free(in) tuya_hashmap_free(in)
93
100#define hashmap_length(in) tuya_hashmap_length(in)
101
102#ifdef __cplusplus
103}
104#endif /* __cplusplus */
105
106#endif // __HASHMAP_H__
tuya hasmap module
void * ANY_T
any_t is a pointer. This allows you to put arbitrary structures in the hashmap.
Definition: tuya_hashmap.h:32
ANY_T MAP_T
map_t is a pointer to an internally maintained data structure. Clients of this package do not need to...
Definition: tuya_hashmap.h:39
ANY_T * ANY_T_ITER
any_t_iter is a iterator which used to traverse the hashmap
Definition: tuya_hashmap.h:45