#include <sysc/utils/sc_hash.h>


Public Types | |
| typedef sc_strhash_iter< C > | iterator |
| typedef unsigned(* | hash_fn_t )(const void *) |
| typedef int(* | cmpr_fn_t )(const void *, const void *) |
Public Member Functions | |
| sc_strhash (C def=(C) 0, int size=PHASH_DEFAULT_INIT_TABLE_SIZE, int density=PHASH_DEFAULT_MAX_DENSITY, double grow=PHASH_DEFAULT_GROW_FACTOR, bool reorder=PHASH_DEFAULT_REORDER_FLAG, unsigned(*hash_fn)(const void *)=default_str_hash_fn, int(*cmpr_fn)(const void *, const void *)=sc_strhash_cmp) | |
| ~sc_strhash () | |
| void | erase () |
| void | copy (const sc_strhash< C > *b) |
| void | copy (const sc_strhash< C > &b) |
| int | insert (char *k, C c) |
| int | insert (char *k) |
| int | insert_if_not_exists (char *k, C c) |
| int | insert_if_not_exists (char *k) |
| int | remove (const char *k) |
| int | remove (const char *k, char **pk, C *pc) |
| int | remove_by_contents (C c) |
| int | remove_by_contents (bool(*predicate)(const void *, void *), void *arg) |
| int | lookup (const char *k, C *pc) const |
| bool | contains (const char *k) const |
| C | operator[] (const char *k) const |
| void | set_cmpr_fn (cmpr_fn_t) |
| void | set_hash_fn (hash_fn_t) |
| bool | empty () const |
| unsigned | count () const |
| void | erase (void(*kfree)(void *)) |
| void | copy (const sc_phash_base *) |
| void | copy (const sc_phash_base &b) |
| void | copy (const sc_phash_base &b, void *(*kdup)(const void *), void(*kfree)(void *)) |
| int | insert (void *k, void *c) |
| int | insert (void *k) |
| int | insert (void *k, void *c, void *(*kdup)(const void *)) |
| int | insert_if_not_exists (void *k, void *c) |
| int | insert_if_not_exists (void *k) |
| int | insert_if_not_exists (void *k, void *c, void *(*kdup)(const void *)) |
| int | remove (const void *k) |
| int | remove (const void *k, void **pk, void **pc) |
| int | remove (const void *k, void(*kfree)(void *)) |
| int | remove_by_contents (const void *c) |
| int | remove_by_contents (const void *c, void(*kfree)(void *)) |
| int | remove_by_contents (bool(*predicate)(const void *, void *), void *arg, void(*kfree)(void *)) |
| int | lookup (const void *k, void **pc) const |
| bool | contains (const void *k) const |
| void * | operator[] (const void *key) const |
Protected Member Functions | |
| void | rehash () |
| unsigned | do_hash (const void *key) const |
| sc_phash_elem * | add_direct (void *key, void *contents, unsigned hash_val) |
| sc_phash_elem * | find_entry_c (unsigned hv, const void *k, sc_phash_elem ***plast) |
| sc_phash_elem * | find_entry_q (unsigned hv, const void *k, sc_phash_elem ***plast) |
| sc_phash_elem * | find_entry (unsigned hv, const void *k, sc_phash_elem ***plast=0) const |
Protected Attributes | |
| void * | default_value |
| int | num_bins |
| int | num_entries |
| int | max_density |
| int | reorder_flag |
| double | grow_factor |
| sc_phash_elem ** | bins |
| hash_fn_t | hash |
| cmpr_fn_t | cmpr |
Friends | |
| class | sc_strhash_iter< C > |
Definition at line 367 of file sc_hash.h.
| typedef sc_strhash_iter<C> sc_core::sc_strhash< C >::iterator |
typedef unsigned(* sc_core::sc_phash_base::hash_fn_t)(const void *) [inherited] |
typedef int(* sc_core::sc_phash_base::cmpr_fn_t)(const void *, const void *) [inherited] |
| sc_core::sc_strhash< C >::sc_strhash | ( | C | def = (C) 0, |
|
| int | size = PHASH_DEFAULT_INIT_TABLE_SIZE, |
|||
| int | density = PHASH_DEFAULT_MAX_DENSITY, |
|||
| double | grow = PHASH_DEFAULT_GROW_FACTOR, |
|||
| bool | reorder = PHASH_DEFAULT_REORDER_FLAG, |
|||
| unsigned(*)(const void *) | hash_fn = default_str_hash_fn, |
|||
| int(*)(const void *, const void *) | cmpr_fn = sc_strhash_cmp | |||
| ) | [inline] |
| sc_core::sc_strhash< C >::~sc_strhash | ( | ) | [inline] |
| void sc_core::sc_strhash< C >::erase | ( | ) | [inline] |
| void sc_core::sc_strhash< C >::copy | ( | const sc_strhash< C > * | b | ) | [inline] |
| void sc_core::sc_strhash< C >::copy | ( | const sc_strhash< C > & | b | ) | [inline] |
| int sc_core::sc_strhash< C >::insert | ( | char * | k, | |
| C | c | |||
| ) | [inline] |
| int sc_core::sc_strhash< C >::insert | ( | char * | k | ) | [inline] |
| int sc_core::sc_strhash< C >::insert_if_not_exists | ( | char * | k, | |
| C | c | |||
| ) | [inline] |
| int sc_core::sc_strhash< C >::insert_if_not_exists | ( | char * | k | ) | [inline] |
| int sc_core::sc_strhash< C >::remove | ( | const char * | k | ) | [inline] |
| int sc_core::sc_strhash< C >::remove | ( | const char * | k, | |
| char ** | pk, | |||
| C * | pc | |||
| ) | [inline] |
| int sc_core::sc_strhash< C >::remove_by_contents | ( | C | c | ) | [inline] |
| int sc_core::sc_strhash< C >::remove_by_contents | ( | bool(*)(const void *, void *) | predicate, | |
| void * | arg | |||
| ) | [inline] |
| int sc_core::sc_strhash< C >::lookup | ( | const char * | k, | |
| C * | pc | |||
| ) | const [inline] |
| bool sc_core::sc_strhash< C >::contains | ( | const char * | k | ) | const [inline] |
| C sc_core::sc_strhash< C >::operator[] | ( | const char * | k | ) | const [inline] |
| void sc_core::sc_phash_base::rehash | ( | ) | [protected, inherited] |
Definition at line 135 of file sc_hash.cpp.
| unsigned sc_core::sc_phash_base::do_hash | ( | const void * | key | ) | const [inline, protected, inherited] |
| sc_phash_elem * sc_core::sc_phash_base::add_direct | ( | void * | key, | |
| void * | contents, | |||
| unsigned | hash_val | |||
| ) | [protected, inherited] |
Definition at line 210 of file sc_hash.cpp.
| sc_phash_elem * sc_core::sc_phash_base::find_entry_c | ( | unsigned | hv, | |
| const void * | k, | |||
| sc_phash_elem *** | plast | |||
| ) | [protected, inherited] |
Definition at line 189 of file sc_hash.cpp.
| sc_phash_elem * sc_core::sc_phash_base::find_entry_q | ( | unsigned | hv, | |
| const void * | k, | |||
| sc_phash_elem *** | plast | |||
| ) | [protected, inherited] |
Definition at line 167 of file sc_hash.cpp.
| sc_phash_elem* sc_core::sc_phash_base::find_entry | ( | unsigned | hv, | |
| const void * | k, | |||
| sc_phash_elem *** | plast = 0 | |||
| ) | const [inline, protected, inherited] |
| void sc_core::sc_phash_base::set_cmpr_fn | ( | cmpr_fn_t | c | ) | [inherited] |
Definition at line 107 of file sc_hash.cpp.
| void sc_core::sc_phash_base::set_hash_fn | ( | hash_fn_t | h | ) | [inherited] |
Definition at line 113 of file sc_hash.cpp.
| bool sc_core::sc_phash_base::empty | ( | ) | const [inline, inherited] |
| unsigned sc_core::sc_phash_base::count | ( | ) | const [inline, inherited] |
| void sc_core::sc_phash_base::erase | ( | void(*)(void *) | kfree | ) | [inherited] |
Definition at line 240 of file sc_hash.cpp.
| void sc_core::sc_phash_base::copy | ( | const sc_phash_base * | b | ) | [inherited] |
Definition at line 257 of file sc_hash.cpp.
| void sc_core::sc_phash_base::copy | ( | const sc_phash_base & | b | ) | [inline, inherited] |
| void sc_core::sc_phash_base::copy | ( | const sc_phash_base & | b, | |
| void *(*)(const void *) | kdup, | |||
| void(*)(void *) | kfree | |||
| ) | [inherited] |
Definition at line 266 of file sc_hash.cpp.
| int sc_core::sc_phash_base::insert | ( | void * | k, | |
| void * | c | |||
| ) | [inherited] |
Definition at line 275 of file sc_hash.cpp.
| int sc_core::sc_phash_base::insert | ( | void * | k | ) | [inline, inherited] |
| int sc_core::sc_phash_base::insert | ( | void * | k, | |
| void * | c, | |||
| void *(*)(const void *) | kdup | |||
| ) | [inherited] |
Definition at line 290 of file sc_hash.cpp.
| int sc_core::sc_phash_base::insert_if_not_exists | ( | void * | k, | |
| void * | c | |||
| ) | [inherited] |
Definition at line 305 of file sc_hash.cpp.
| int sc_core::sc_phash_base::insert_if_not_exists | ( | void * | k | ) | [inline, inherited] |
| int sc_core::sc_phash_base::insert_if_not_exists | ( | void * | k, | |
| void * | c, | |||
| void *(*)(const void *) | kdup | |||
| ) | [inherited] |
Definition at line 318 of file sc_hash.cpp.
| int sc_core::sc_phash_base::remove | ( | const void * | k | ) | [inherited] |
Definition at line 331 of file sc_hash.cpp.
| int sc_core::sc_phash_base::remove | ( | const void * | k, | |
| void ** | pk, | |||
| void ** | pc | |||
| ) | [inherited] |
Definition at line 348 of file sc_hash.cpp.
| int sc_core::sc_phash_base::remove | ( | const void * | k, | |
| void(*)(void *) | kfree | |||
| ) | [inherited] |
Definition at line 372 of file sc_hash.cpp.
| int sc_core::sc_phash_base::remove_by_contents | ( | const void * | c | ) | [inherited] |
Definition at line 385 of file sc_hash.cpp.
| int sc_core::sc_phash_base::remove_by_contents | ( | const void * | c, | |
| void(*)(void *) | kfree | |||
| ) | [inherited] |
Reimplemented in sc_core::sc_phash< K, C >, and sc_core::sc_phash< const const sc_core::sc_process_b *, T * >.
Definition at line 439 of file sc_hash.cpp.
| int sc_core::sc_phash_base::remove_by_contents | ( | bool(*)(const void *, void *) | predicate, | |
| void * | arg, | |||
| void(*)(void *) | kfree | |||
| ) | [inherited] |
Reimplemented in sc_core::sc_phash< K, C >, and sc_core::sc_phash< const const sc_core::sc_process_b *, T * >.
Definition at line 467 of file sc_hash.cpp.
| int sc_core::sc_phash_base::lookup | ( | const void * | k, | |
| void ** | pc | |||
| ) | const [inherited] |
Definition at line 495 of file sc_hash.cpp.
| bool sc_core::sc_phash_base::contains | ( | const void * | k | ) | const [inline, inherited] |
| void * sc_core::sc_phash_base::operator[] | ( | const void * | key | ) | const [inherited] |
Definition at line 510 of file sc_hash.cpp.
friend class sc_strhash_iter< C > [friend] |
void* sc_core::sc_phash_base::default_value [protected, inherited] |
int sc_core::sc_phash_base::num_bins [protected, inherited] |
int sc_core::sc_phash_base::num_entries [protected, inherited] |
int sc_core::sc_phash_base::max_density [protected, inherited] |
int sc_core::sc_phash_base::reorder_flag [protected, inherited] |
double sc_core::sc_phash_base::grow_factor [protected, inherited] |
sc_phash_elem** sc_core::sc_phash_base::bins [protected, inherited] |
hash_fn_t sc_core::sc_phash_base::hash [protected, inherited] |
cmpr_fn_t sc_core::sc_phash_base::cmpr [protected, inherited] |
1.5.5