* Copyright (c) 2020-2021 Huawei Device Co., Ltd.
*
* HDF is dual licensed: you can use it either under the terms of
* the GPL, or the BSD license, at your option.
* See the LICENSE file in the root of this repository for complete details.
*/
#ifndef HDF_MAP_H
#define HDF_MAP_H
#include "hdf_base.h"
#ifdef __cplusplus
extern "C" {
#endif
struct MapNode;
typedef struct {
struct MapNode **nodes;
uint32_t nodeSize;
uint32_t bucketSize;
} Map;
void MapInit(Map *map);
void MapDelete(Map *map);
int32_t MapSet(Map *map, const char *key, const void *value, uint32_t valueSize);
void *MapGet(const Map *map, const char *key);
int32_t MapErase(Map *map, const char *key);
#ifdef __cplusplus
}
#endif
#endif