NetSurf
Data Fields
hashmap_parameters_t Struct Reference

Parameters for hashmaps. More...

#include <hashmap.h>

Data Fields

hashmap_key_clone_t key_clone
 A function which when called will clone a key and give ownership of the returned object to the hashmap. More...
 
hashmap_key_hash_t key_hash
 A function which when given a key will return its hash. More...
 
hashmap_key_eq_t key_eq
 A function to compare two keys and return if they are equal. More...
 
hashmap_key_destroy_t key_destroy
 A function which when called will destroy a key object. More...
 
hashmap_value_alloc_t value_alloc
 A function which when called will allocate a value object. More...
 
hashmap_value_destroy_t value_destroy
 A function which when called will destroy a value object. More...
 

Detailed Description

Parameters for hashmaps.

Definition at line 77 of file hashmap.h.

Field Documentation

◆ key_clone

hashmap_key_clone_t hashmap_parameters_t::key_clone

A function which when called will clone a key and give ownership of the returned object to the hashmap.

Definition at line 82 of file hashmap.h.

Referenced by hashmap_insert().

◆ key_destroy

hashmap_key_destroy_t hashmap_parameters_t::key_destroy

A function which when called will destroy a key object.

Definition at line 100 of file hashmap.h.

Referenced by hashmap_destroy(), hashmap_insert(), and hashmap_remove().

◆ key_eq

hashmap_key_eq_t hashmap_parameters_t::key_eq

A function to compare two keys and return if they are equal.

Note: identity is not necessary, nor strict equality, so long as the function is a full equality model. (i.e. key1 == key2 => key2 == key1)

Definition at line 95 of file hashmap.h.

Referenced by hashmap_insert(), hashmap_lookup(), and hashmap_remove().

◆ key_hash

hashmap_key_hash_t hashmap_parameters_t::key_hash

A function which when given a key will return its hash.

Definition at line 87 of file hashmap.h.

Referenced by hashmap_insert(), hashmap_lookup(), and hashmap_remove().

◆ value_alloc

hashmap_value_alloc_t hashmap_parameters_t::value_alloc

A function which when called will allocate a value object.

Definition at line 105 of file hashmap.h.

Referenced by hashmap_insert().

◆ value_destroy

hashmap_value_destroy_t hashmap_parameters_t::value_destroy

A function which when called will destroy a value object.

Definition at line 110 of file hashmap.h.

Referenced by hashmap_destroy(), hashmap_insert(), and hashmap_remove().


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