![]() |
Data Fields | |
int | count |
int | hash |
char | key [_Q_HASHARR_MAX_KEYSIZE] |
int | keylen |
unsigned char | keymd5 [16] |
unsigned char | value [_Q_HASHARR_DEF_VALUESIZE] |
int | size |
int | link |
bool(* | put )(Q_HASHARR *tbl, const char *key, const void *value, int size) |
bool(* | putStr )(Q_HASHARR *tbl, const char *key, const char *str) |
bool(* | putInt )(Q_HASHARR *tbl, const char *key, int num) |
void *(* | get )(Q_HASHARR *tbl, const char *key, int *size) |
char *(* | getStr )(Q_HASHARR *tbl, const char *key) |
int(* | getInt )(Q_HASHARR *tbl, const char *key) |
const char *(* | getNext )(Q_HASHARR *tbl, int *idx) |
bool(* | remove )(Q_HASHARR *tbl, const char *key) |
bool(* | truncate )(Q_HASHARR *tbl) |
bool(* | print )(Q_HASHARR *tbl, FILE *out) |
int(* | getNum )(Q_HASHARR *tbl) |
int(* | getMax )(Q_HASHARR *tbl) |
hash collision counter. 0 indicates empty slot, -1 is used for collision resolution, -2 is used for indicating linked block
int _Q_HASHARR::hash |
key hash. we use qFnv32Hash() to generate hash integer
char _Q_HASHARR::key[_Q_HASHARR_MAX_KEYSIZE] |
key string, it can be truncated
original key length
unsigned char _Q_HASHARR::keymd5[16] |
md5 hash of the key
unsigned char _Q_HASHARR::value[_Q_HASHARR_DEF_VALUESIZE] |
value
int _Q_HASHARR::size |
value size
int _Q_HASHARR::link |
next index of the value