26 #ifndef ATOMTAB_INCLUDED
27 #define ATOMTAB_INCLUDED
34 #include "../base/ver.h"
38 #include "../base/str.h"
41 #ifndef CHECK_INCLUDED
42 #include "../base/check.h"
45 #ifndef MPOOL_INCLUDED
46 #include "../mem/mpool.h"
49 #ifndef FLEXARR_INCLUDED
50 #include "../bds/flexarr.h"
66 static const long ATOMTAB_MAGIC = 0x4154420AL;
72 static const int ATOMTAB_HASHSIZE = 251;
99 int put(
str_t atom_name) {
102 "atomtab_c::put(str_t): atom_name is null");
103 return put(atom_name, atom_name +
str_len(atom_name));
116 int num_atoms()
const {
122 int num_pages()
const {
123 return MemPool.num_alloc_pages();
174 atom_t HashTab[ATOMTAB_HASHSIZE];
183 atom_t AtomArr[ATOMTAB_HASHSIZE];
204 #define ATOMTAB_NULL (static_cast<atomtab_t>(0))
Class Template for Flexible Arrays (Lists with Index Access)
Definition: flexarr.h:86
int str_len(register str_t str)
Definition: str.cpp:34
#define CHECK_VALID(EX)
Definition: check.h:85
const char * str_t
Definition: str.h:41
#define STR_NULL
Definition: str.h:52
Short Strings, Symbolic Constants.
#define CHECK(EX, MSG)
Definition: check.h:69