#ifndef TOR_NAMEMAP_H
#define TOR_NAMEMAP_H
#include "lib/cc/compat_compiler.h"
#include "ext/ht.h"
#include <stddef.h>
typedef struct namemap_t namemap_t;
#define NAMEMAP_ERR UINT_MAX
void namemap_init(namemap_t *map);
const char *namemap_get_name(const namemap_t *map, unsigned id);
const char *namemap_fmt_name(const namemap_t *map, unsigned id);
unsigned namemap_get_id(const namemap_t *map,
const char *name);
unsigned namemap_get_or_create_id(namemap_t *map,
const char *name);
size_t namemap_get_size(const namemap_t *map);
void namemap_clear(namemap_t *map);
#endif