sc_core::sc_phash_base Class Reference

#include <sysc/utils/sc_hash.h>

Inheritance diagram for sc_core::sc_phash_base:
Inheritance graph
[legend]

List of all members.

Public Types

typedef unsigned(* hash_fn_t )(const void *)
typedef int(* cmpr_fn_t )(const void *, const void *)

Public Member Functions

 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

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_phash_base_iter

Detailed Description

Definition at line 48 of file sc_hash.h.


Member Typedef Documentation

typedef int(* sc_core::sc_phash_base::cmpr_fn_t)(const void *, const void *)

Definition at line 55 of file sc_hash.h.

typedef unsigned(* sc_core::sc_phash_base::hash_fn_t)(const void *)

Definition at line 54 of file sc_hash.h.


Constructor & Destructor Documentation

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_core::sc_phash_base::~sc_phash_base (  ) 

Member Function Documentation

sc_phash_elem* sc_core::sc_phash_base::add_direct ( void *  key,
void *  contents,
unsigned  hash_val 
) [protected]
bool sc_core::sc_phash_base::contains ( const void *  k  )  const [inline]

Definition at line 121 of file sc_hash.h.

void sc_core::sc_phash_base::copy ( const sc_phash_base b,
void *(*)(const void *)  kdup,
void(*)(void *)  kfree 
)

Reimplemented in sc_core::sc_phash< K, C >.

void sc_core::sc_phash_base::copy ( const sc_phash_base b  )  [inline]
void sc_core::sc_phash_base::copy ( const sc_phash_base  ) 
unsigned sc_core::sc_phash_base::count (  )  const [inline]

Definition at line 100 of file sc_hash.h.

unsigned sc_core::sc_phash_base::do_hash ( const void *  key  )  const [inline, protected]

Definition at line 71 of file sc_hash.h.

bool sc_core::sc_phash_base::empty (  )  const [inline]

Definition at line 99 of file sc_hash.h.

void sc_core::sc_phash_base::erase ( void(*)(void *)  kfree  ) 
void sc_core::sc_phash_base::erase (  ) 
sc_phash_elem* sc_core::sc_phash_base::find_entry ( unsigned  hv,
const void *  k,
sc_phash_elem ***  plast = 0 
) const [inline, protected]

Definition at line 76 of file sc_hash.h.

sc_phash_elem* sc_core::sc_phash_base::find_entry_c ( unsigned  hv,
const void *  k,
sc_phash_elem ***  plast 
) [protected]
sc_phash_elem* sc_core::sc_phash_base::find_entry_q ( unsigned  hv,
const void *  k,
sc_phash_elem ***  plast 
) [protected]
int sc_core::sc_phash_base::insert ( void *  k,
void *  c,
void *(*)(const void *)  kdup 
)
int sc_core::sc_phash_base::insert ( void *  k  )  [inline]

Reimplemented in sc_core::sc_phash< void *, const T * >.

Definition at line 108 of file sc_hash.h.

int sc_core::sc_phash_base::insert ( void *  k,
void *  c 
)
int sc_core::sc_phash_base::insert_if_not_exists ( void *  k,
void *  c,
void *(*)(const void *)  kdup 
)
int sc_core::sc_phash_base::insert_if_not_exists ( void *  k  )  [inline]

Reimplemented in sc_core::sc_phash< void *, const T * >.

Definition at line 111 of file sc_hash.h.

int sc_core::sc_phash_base::insert_if_not_exists ( void *  k,
void *  c 
)
int sc_core::sc_phash_base::lookup ( const void *  k,
void **  pc 
) const
void* sc_core::sc_phash_base::operator[] ( const void *  key  )  const
void sc_core::sc_phash_base::rehash (  )  [protected]
int sc_core::sc_phash_base::remove ( const void *  k,
void(*)(void *)  kfree 
)
int sc_core::sc_phash_base::remove ( const void *  k,
void **  pk,
void **  pc 
)
int sc_core::sc_phash_base::remove ( const void *  k  ) 
int sc_core::sc_phash_base::remove_by_contents ( bool(*)(const void *, void *)  predicate,
void *  arg,
void(*)(void *)  kfree 
)
int sc_core::sc_phash_base::remove_by_contents ( const void *  c,
void(*)(void *)  kfree 
)
int sc_core::sc_phash_base::remove_by_contents ( bool(*)(const void *, void *)  predicate,
void *  arg 
)
int sc_core::sc_phash_base::remove_by_contents ( const void *  c  ) 
void sc_core::sc_phash_base::set_cmpr_fn ( cmpr_fn_t   ) 
void sc_core::sc_phash_base::set_hash_fn ( hash_fn_t   ) 

Friends And Related Function Documentation

friend class sc_phash_base_iter [friend]

Definition at line 49 of file sc_hash.h.


Member Data Documentation

sc_phash_elem** sc_core::sc_phash_base::bins [protected]

Definition at line 65 of file sc_hash.h.

Definition at line 68 of file sc_hash.h.

Definition at line 58 of file sc_hash.h.

Definition at line 63 of file sc_hash.h.

Definition at line 67 of file sc_hash.h.

Definition at line 61 of file sc_hash.h.

Definition at line 59 of file sc_hash.h.

Definition at line 60 of file sc_hash.h.

Definition at line 62 of file sc_hash.h.


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

Generated on 30 Sep 2015 for SystemC by  doxygen 1.6.1