SystemC  Recoding Infrastructure for SystemC v0.6.3 derived from Accellera SystemC 2.3.1
Accellera SystemC proof-of-concept library
Public Types | Public Member Functions | Friends | List of all members
sc_core::sc_phash< K, C > Class Template Reference

#include <sysc/utils/sc_hash.h>

Inheritance diagram for sc_core::sc_phash< K, C >:
Inheritance graph
[legend]
Collaboration diagram for sc_core::sc_phash< K, C >:
Collaboration graph
[legend]

Public Types

typedef sc_phash_iter< K, C > iterator
 
- Public Types inherited from sc_core::sc_phash_base
typedef unsigned(* hash_fn_t )(const void *)
 
typedef int(* cmpr_fn_t )(const void *, const void *)
 

Public Member Functions

 sc_phash (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, hash_fn_t hash_fn=default_ptr_hash_fn, cmpr_fn_t cmpr_fn=0)
 
 ~sc_phash ()
 
void copy (const sc_phash< K, C > *b)
 
void copy (const sc_phash< K, C > &b)
 
void copy (const sc_phash< K, C > &b, void *(*kdup)(const void *), void(*kfree)(void *))
 
int insert (K k, C c)
 
int insert (K k)
 
int insert (K k, C c, void *(*kdup)(const void *))
 
int insert_if_not_exists (K k, C c)
 
int insert_if_not_exists (K k)
 
int insert_if_not_exists (K k, C c, void *(*kdup)(const void *))
 
int remove (K k)
 
int remove (K k, K *pk, C *pc)
 
int remove (K k, void(*kfree)(void *))
 
int remove_by_contents (C c)
 
int remove_by_contents (bool(*predicate)(const void *, void *), void *arg)
 
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 (K k, C *pc) const
 
bool contains (K k) const
 
operator[] (K k) const
 
- Public Member Functions inherited from sc_core::sc_phash_base
 sc_phash_base (void *def=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, hash_fn_t hash_fn=default_ptr_hash_fn, cmpr_fn_t cmpr_fn=0)
 
 ~sc_phash_base ()
 
void set_cmpr_fn (cmpr_fn_t)
 
void set_hash_fn (hash_fn_t)
 
bool empty () const
 
unsigned count () const
 
void erase ()
 
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 (bool(*predicate)(const void *, void *), void *arg)
 
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
 

Friends

class sc_phash_iter< K, C >
 

Additional Inherited Members

- Protected Member Functions inherited from sc_core::sc_phash_base
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 inherited from sc_core::sc_phash_base
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
 

Detailed Description

template<class K, class C>
class sc_core::sc_phash< K, C >

Definition at line 159 of file sc_hash.h.

Member Typedef Documentation

template<class K, class C>
typedef sc_phash_iter<K,C> sc_core::sc_phash< K, C >::iterator

Definition at line 163 of file sc_hash.h.

Constructor & Destructor Documentation

template<class K, class C>
sc_core::sc_phash< K, C >::sc_phash ( 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,
hash_fn_t  hash_fn = default_ptr_hash_fn,
cmpr_fn_t  cmpr_fn = 0 
)
inline

Definition at line 165 of file sc_hash.h.

template<class K, class C>
sc_core::sc_phash< K, C >::~sc_phash ( )
inline

Definition at line 173 of file sc_hash.h.

Member Function Documentation

template<class K, class C>
bool sc_core::sc_phash< K, C >::contains ( k) const
inline

Definition at line 223 of file sc_hash.h.

template<class K, class C>
void sc_core::sc_phash< K, C >::copy ( const sc_phash< K, C > *  b)
inline

Definition at line 175 of file sc_hash.h.

template<class K, class C>
void sc_core::sc_phash< K, C >::copy ( const sc_phash< K, C > &  b)
inline

Definition at line 176 of file sc_hash.h.

template<class K, class C>
void sc_core::sc_phash< K, C >::copy ( const sc_phash< K, C > &  b,
void *(*)(const void *)  kdup,
void(*)(void *)  kfree 
)
inline

Definition at line 177 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::insert ( k,
c 
)
inline

Definition at line 179 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::insert ( k)
inline

Definition at line 180 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::insert ( k,
c,
void *(*)(const void *)  kdup 
)
inline

Definition at line 181 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::insert_if_not_exists ( k,
c 
)
inline

Definition at line 182 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::insert_if_not_exists ( k)
inline

Definition at line 186 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::insert_if_not_exists ( k,
c,
void *(*)(const void *)  kdup 
)
inline

Definition at line 190 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::lookup ( k,
C *  pc 
) const
inline

Definition at line 219 of file sc_hash.h.

template<class K, class C>
C sc_core::sc_phash< K, C >::operator[] ( k) const
inline

Definition at line 227 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::remove ( k)
inline

Definition at line 194 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::remove ( k,
K *  pk,
C *  pc 
)
inline

Definition at line 195 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::remove ( k,
void(*)(void *)  kfree 
)
inline

Definition at line 199 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::remove_by_contents ( c)
inline

Definition at line 203 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::remove_by_contents ( bool(*)(const void *, void *)  predicate,
void *  arg 
)
inline

Definition at line 207 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::remove_by_contents ( const void *  c,
void(*)(void *)  kfree 
)
inline

Definition at line 211 of file sc_hash.h.

template<class K, class C>
int sc_core::sc_phash< K, C >::remove_by_contents ( bool(*)(const void *, void *)  predicate,
void *  arg,
void(*)(void *)  kfree 
)
inline

Definition at line 215 of file sc_hash.h.

Friends And Related Function Documentation

template<class K, class C>
friend class sc_phash_iter< K, C >
friend

Definition at line 160 of file sc_hash.h.


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