|
TuyaOS
|
tuya hasmap module 更多...
#include "tuya_hashmap.h"

宏定义 | |
| #define | hashmap_data_traversal(in, key, arg_iterator) tuya_hashmap_data_traversal(in, key, arg_iterator) |
| traverse all data with same key 更多... | |
| #define | HASHMAP_FOR_EACH_DATA(in, key, data_iter) TUYA_HASHMAP_FOR_EACH_DATA(in, key, data_iter) |
| traverse all data with same key | |
| #define | hashmap_free(in) tuya_hashmap_free(in) |
| free the hashmap 更多... | |
| #define | hashmap_get(in, key, arg) tuya_hashmap_get(in, key, arg) |
| get an element from the hashmap 更多... | |
| #define | hashmap_length(in) tuya_hashmap_length(in) |
| get current size of the hashmap 更多... | |
| #define | hashmap_new(table_size) tuya_hashmap_new(table_size) |
| create a new empty hashmap 更多... | |
| #define | hashmap_put(in, key, data) tuya_hashmap_put(in, key , data) |
| Add an element to the hashmap 更多... | |
| #define | hashmap_remove(in, key, data) tuya_hashmap_remove(in, key, data) |
| remove an element from the hashmap 更多... | |
类型定义 | |
| typedef ANY_T | any_t |
| typedef ANY_T_ITER | any_t_iter |
| typedef MAP_T | map_t |
tuya hasmap module
| #define hashmap_data_traversal | ( | in, | |
| key, | |||
| arg_iterator | |||
| ) | tuya_hashmap_data_traversal(in, key, arg_iterator) |
traverse all data with same key
| [in] | in | the hashmap |
| [in] | key | the key of element |
| [in,out] | arg_iterator | the traverse iterator |
| #define hashmap_free | ( | in | ) | tuya_hashmap_free(in) |
free the hashmap
| [in] | in | the hashmap need to free |
| #define hashmap_get | ( | in, | |
| key, | |||
| arg | |||
| ) | tuya_hashmap_get(in, key, arg) |
get an element from the hashmap
| [in] | in | the hashmap |
| [in] | key | the key of the element |
| [out] | arg | the first value that the key matches |
| #define hashmap_length | ( | in | ) | tuya_hashmap_length(in) |
get current size of the hashmap
| [in] | in | the hashmap |
| #define hashmap_new | ( | table_size | ) | tuya_hashmap_new(table_size) |
create a new empty hashmap
| [in] | table_size | the hash table size |
| #define hashmap_put | ( | in, | |
| key, | |||
| data | |||
| ) | tuya_hashmap_put(in, key , data) |
Add an element to the hashmap
| [in] | in | the hashmap |
| [in] | key | the key of hash element |
| [in] | data | the data of hash element |
| #define hashmap_remove | ( | in, | |
| key, | |||
| data | |||
| ) | tuya_hashmap_remove(in, key, data) |
remove an element from the hashmap
| [in] | in | the hashmap |
| [in] | key | the key of element |
| [in] | data | the data of the element |