31 #ifndef STRTAB_INCLUDED
32 #define STRTAB_INCLUDED
39 #include "../base/ver.h"
43 #include "../base/str.h"
46 #ifndef CHECK_INCLUDED
47 #include "../base/check.h"
50 #ifndef MPOOL_INCLUDED
51 #include "../mem/mpool.h"
54 #ifndef FLEXARR_INCLUDED
55 #include "../bds/flexarr.h"
58 #ifndef STRMEM_INCLUDED
59 #include "../dom/strmem.h"
71 static const long STRTAB_MAGIC = 0x5354420AL;
131 return put(str, str +
str_len(str));
135 str_t get(
int id)
const {
136 return StrArr.get(
id);
141 return MemPool.name();
145 int num_strings()
const {
146 return StrMem.num_strings();
150 int num_leaf_nodes()
const {
155 int num_small_nodes()
const {
156 return NumSmallNodes;
160 int num_full_nodes()
const {
165 int num_node_pages()
const {
170 int num_str_pages()
const {
171 return StrMem.num_pages();
175 int num_array_pages()
const {
176 return StrArr.num_pages();
225 int parent_no,
int node_no)
const;
282 #define STRTAB_NULL (static_cast<strtab_t>(0))
Definition: strtab.cpp:106
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
Definition: strtab.cpp:54
Definition: strtab.cpp:67
#define STR_NULL
Definition: str.h:52
Definition: strtab.cpp:85
#define CHECK(EX, MSG)
Definition: check.h:69