NeoMutt  2019-11-11
Teaching an old dog new tricks
DOXYGEN
Hash Struct Reference

A Hash Table. More...

#include "hash.h"

+ Collaboration diagram for Hash:

Data Fields

size_t nelem
 Number of elements in the Hash table. More...
 
bool strdup_keys: 1
 if set, the key->strkey is strdup'ed More...
 
bool allow_dups: 1
 if set, duplicate keys are allowed More...
 
struct HashElem ** table
 Array of Hash keys. More...
 
size_t(* gen_hash )(union HashKey, size_t)
 Function to generate hash id from the key. More...
 
int(* cmp_key )(union HashKey, union HashKey)
 Function to compare two Hash keys. More...
 
intptr_t hdata
 Data to pass to the free_hdata() function. More...
 
hashelem_free_t free_hdata
 Function to free a Hash element. More...
 

Detailed Description

A Hash Table.

Definition at line 61 of file hash.h.

Field Documentation

◆ nelem

size_t Hash::nelem

Number of elements in the Hash table.

Definition at line 63 of file hash.h.

◆ strdup_keys

bool Hash::strdup_keys

if set, the key->strkey is strdup'ed

Definition at line 64 of file hash.h.

◆ allow_dups

bool Hash::allow_dups

if set, duplicate keys are allowed

Definition at line 65 of file hash.h.

◆ table

struct HashElem** Hash::table

Array of Hash keys.

Definition at line 66 of file hash.h.

◆ gen_hash

size_t(* Hash::gen_hash) (union HashKey, size_t)

Function to generate hash id from the key.

Definition at line 67 of file hash.h.

◆ cmp_key

int(* Hash::cmp_key) (union HashKey, union HashKey)

Function to compare two Hash keys.

Definition at line 68 of file hash.h.

◆ hdata

intptr_t Hash::hdata

Data to pass to the free_hdata() function.

Definition at line 69 of file hash.h.

◆ free_hdata

hashelem_free_t Hash::free_hdata

Function to free a Hash element.

Definition at line 70 of file hash.h.


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