#ifndef STRMAP_H
#define STRMAP_H
#include "hashmap.h"
struct mem_pool;
struct strmap { … };
struct strmap_entry { … };
int cmp_strmap_entry(const void *hashmap_cmp_fn_data,
const struct hashmap_entry *entry1,
const struct hashmap_entry *entry2,
const void *keydata);
#define STRMAP_INIT …
#define STRINTMAP_INIT …
#define STRSET_INIT …
void strmap_init(struct strmap *map);
void strmap_init_with_options(struct strmap *map,
struct mem_pool *pool,
int strdup_strings);
void strmap_clear(struct strmap *map, int free_values);
void strmap_partial_clear(struct strmap *map, int free_values);
void *strmap_put(struct strmap *map, const char *str, void *data);
struct strmap_entry *strmap_get_entry(struct strmap *map, const char *str);
void *strmap_get(struct strmap *map, const char *str);
int strmap_contains(struct strmap *map, const char *str);
void strmap_remove(struct strmap *map, const char *str, int free_value);
static inline unsigned int strmap_get_size(struct strmap *map)
{ … }
static inline int strmap_empty(struct strmap *map)
{ … }
#define strmap_for_each_entry(mystrmap, iter, var) …
struct strintmap { … };
#define strintmap_for_each_entry(mystrmap, iter, var) …
static inline void strintmap_init(struct strintmap *map, int default_value)
{ … }
static inline void strintmap_init_with_options(struct strintmap *map,
int default_value,
struct mem_pool *pool,
int strdup_strings)
{ … }
static inline void strintmap_clear(struct strintmap *map)
{ … }
static inline void strintmap_partial_clear(struct strintmap *map)
{ … }
static inline int strintmap_contains(struct strintmap *map, const char *str)
{ … }
static inline void strintmap_remove(struct strintmap *map, const char *str)
{ … }
static inline int strintmap_empty(struct strintmap *map)
{ … }
static inline unsigned int strintmap_get_size(struct strintmap *map)
{ … }
static inline int strintmap_get(struct strintmap *map, const char *str)
{ … }
static inline void strintmap_set(struct strintmap *map, const char *str,
intptr_t v)
{ … }
void strintmap_incr(struct strintmap *map, const char *str, intptr_t amt);
struct strset { … };
#define strset_for_each_entry(mystrset, iter, var) …
static inline void strset_init(struct strset *set)
{ … }
static inline void strset_init_with_options(struct strset *set,
struct mem_pool *pool,
int strdup_strings)
{ … }
static inline void strset_clear(struct strset *set)
{ … }
static inline void strset_partial_clear(struct strset *set)
{ … }
static inline int strset_contains(struct strset *set, const char *str)
{ … }
static inline void strset_remove(struct strset *set, const char *str)
{ … }
static inline int strset_empty(struct strset *set)
{ … }
static inline unsigned int strset_get_size(struct strset *set)
{ … }
int strset_add(struct strset *set, const char *str);
#endif