NeoMutt  2024-02-01-35-geee02f
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
HashTable Struct Reference

A Hash Table. More...

#include "hash.h"

+ Collaboration diagram for HashTable:

Data Fields

size_t num_elems
 Number of buckets in the Hash Table.
 
bool strdup_keys: 1
 if set, the key->strkey is strdup()'d
 
bool allow_dups: 1
 if set, duplicate keys are allowed
 
struct HashElem ** table
 Array of Hash keys.
 
hash_gen_hash_t gen_hash
 Function to generate hash id from the key.
 
hash_cmp_key_t cmp_key
 Function to compare two Hash keys.
 
intptr_t hdata
 Data to pass to the hdata_free() function.
 
hash_hdata_free_t hdata_free
 Function to free a Hash element.
 

Detailed Description

A Hash Table.

Note
The number of actual elements in the HashTable isn't recorded.

Definition at line 96 of file hash.h.

Field Documentation

◆ num_elems

size_t HashTable::num_elems

Number of buckets in the Hash Table.

Definition at line 98 of file hash.h.

◆ strdup_keys

bool HashTable::strdup_keys

if set, the key->strkey is strdup()'d

Definition at line 99 of file hash.h.

◆ allow_dups

bool HashTable::allow_dups

if set, duplicate keys are allowed

Definition at line 100 of file hash.h.

◆ table

struct HashElem** HashTable::table

Array of Hash keys.

Definition at line 101 of file hash.h.

◆ gen_hash

hash_gen_hash_t HashTable::gen_hash

Function to generate hash id from the key.

Definition at line 102 of file hash.h.

◆ cmp_key

hash_cmp_key_t HashTable::cmp_key

Function to compare two Hash keys.

Definition at line 103 of file hash.h.

◆ hdata

intptr_t HashTable::hdata

Data to pass to the hdata_free() function.

Definition at line 104 of file hash.h.

◆ hdata_free

hash_hdata_free_t HashTable::hdata_free

Function to free a Hash element.

Definition at line 105 of file hash.h.


The documentation for this struct was generated from the following file: