Wed Oct 28 11:53:44 2009

Asterisk developer's documentation


ast_hashtab Struct Reference

#include <hashtab.h>

Collaboration diagram for ast_hashtab:

Collaboration graph
[legend]

Data Fields

struct ast_hashtab_bucket ** array
int(* compare )(const void *a, const void *b)
int do_locking
unsigned int(* hash )(const void *obj)
int hash_tab_elements
int hash_tab_size
int largest_bucket_size
ast_rwlock_t lock
int(* newsize )(struct ast_hashtab *tab)
int(* resize )(struct ast_hashtab *tab)
int resize_count
struct ast_hashtab_buckettlist

Detailed Description

Definition at line 80 of file hashtab.h.


Field Documentation

struct ast_hashtab_bucket** array [read]

int(* compare)(const void *a, const void *b)

a ptr to func that returns int, and take two void* ptrs, compares them, rets -1 if a < b; rets 0 if a==b; rets 1 if a>b

Referenced by ast_hashtab_create(), ast_hashtab_dup(), ast_hashtab_lookup_internal(), and ast_hashtab_remove_object_via_lookup_nolock().

unsigned int(* hash)(const void *obj)

a stat on the health of the table

Definition at line 93 of file hashtab.h.

Referenced by ast_hashtab_get_stats(), ast_hashtab_insert_immediate_bucket(), and ast_hashtab_resize().

int(* newsize)(struct ast_hashtab *tab)

a ptr to func that returns int, a new size for hash tab, based on curr_size

Referenced by ast_hashtab_create(), ast_hashtab_dup(), and ast_hashtab_resize().

int(* resize)(struct ast_hashtab *tab)

a function to decide whether this hashtable should be resized now

Referenced by ast_hashtab_create(), ast_hashtab_dup(), and ast_hashtab_insert_immediate_bucket().

a count of the number of times this table has been resized

Definition at line 94 of file hashtab.h.

Referenced by ast_hashtab_get_stats(), and ast_hashtab_resize().

struct ast_hashtab_bucket* tlist [read]

the head of a DLList of all the hashbuckets in the table (for traversal).

Definition at line 83 of file hashtab.h.

Referenced by ast_hashtab_destroy(), ast_hashtab_insert_immediate_bucket(), ast_hashtab_remove_object_internal(), ast_hashtab_resize(), ast_hashtab_start_traversal(), and ast_hashtab_start_write_traversal().


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

Generated on Wed Oct 28 11:53:44 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6