Lines Matching defs:void
36 extern unsigned default_int_hash_fn(const void*);
37 extern unsigned default_ptr_hash_fn(const void*);
38 extern unsigned default_str_hash_fn(const void*);
56 typedef unsigned (*hash_fn_t)(const void*);
57 typedef int (*cmpr_fn_t)(const void*, const void*);
60 void* default_value;
72 void rehash();
73 unsigned do_hash(const void* key) const { return (*hash)(key) % num_bins; }
75 sc_phash_elem* add_direct(void* key, void* contents, unsigned hash_val);
76 sc_phash_elem* find_entry_c(unsigned hv, const void* k, sc_phash_elem*** plast);
77 sc_phash_elem* find_entry_q(unsigned hv, const void* k, sc_phash_elem*** plast);
78 sc_phash_elem* find_entry(unsigned hv, const void* k, sc_phash_elem*** plast=0) const
89 sc_phash_base( void* def = 0,
98 void set_cmpr_fn(cmpr_fn_t);
99 void set_hash_fn(hash_fn_t);
104 void erase();
105 void erase(void (*kfree)(void*));
106 void copy( const sc_phash_base* );
107 void copy( const sc_phash_base& b ) { copy(&b); }
108 void copy( const sc_phash_base& b, void* (*kdup)(const void*), void (*kfree)(void*));
109 int insert( void* k, void* c );
110 int insert( void* k ) { return insert(k, default_value); }
111 int insert( void* k, void* c, void* (*kdup)(const void*) );
112 int insert_if_not_exists(void* k, void* c);
113 int insert_if_not_exists(void* k) { return insert_if_not_exists(k, default_value); }
114 int insert_if_not_exists(void* k, void* c, void* (*kdup)(const void*));
115 int remove(const void* k);
116 int remove(const void* k, void** pk, void** pc);
117 int remove(const void* k, void (*kfree)(void*));
118 int remove_by_contents(const void* c);
119 int remove_by_contents(bool (*predicate)(const void*, void*), void* arg);
120 int remove_by_contents(const void* c, void (*kfree)(void*));
121 int remove_by_contents(bool (*predicate)(const void*, void*), void* arg, void (*kfree)(void*));
122 int lookup(const void* k, void** pc) const;
123 bool contains(const void* k) const { return (lookup(k, 0) != 0); }
124 void* operator[](const void* key) const;
136 void reset(sc_phash_base* t);
137 void reset(sc_phash_base& t) { reset(&t); }
148 void step();
149 void operator++(int) { step(); }
150 void remove();
151 void remove(void (*kfree)(void*));
152 void* key() const;
153 void* contents() const;
154 void* set_contents(void* c);
174 : sc_phash_base((void*) def, size, density, grow, reorder, hash_fn, cmpr_fn) { }
177 void copy(const sc_phash<K,C>* b) { sc_phash_base::copy(b); }
178 void copy(const sc_phash<K,C>& b) { sc_phash_base::copy(b); }
179 void copy(const sc_phash<K,C>& b, void* (*kdup)(const void*), void (*kfree)(void*)) { sc_phash_base::copy(b, kdup, kfree); }
181 int insert(K k, C c) { return sc_phash_base::insert((void*) k, (void*) c); }
182 int insert(K k) { return sc_phash_base::insert((void*) k, default_value); }
183 int insert(K k, C c, void* (*kdup)(const void*)) { return sc_phash_base::insert((void*) k, (void*) c, kdup); }
186 return sc_phash_base::insert_if_not_exists((void*) k, (void*) c);
190 return sc_phash_base::insert_if_not_exists((void*) k, default_value);
192 int insert_if_not_exists(K k, C c, void* (*kdup)(const void*))
194 return sc_phash_base::insert_if_not_exists((void*) k, (void*) c, kdup);
196 int remove(K k) { return sc_phash_base::remove((const void*) k); }
199 return sc_phash_base::remove((const void*) k, (void**) pk, (void**) pc);
201 int remove(K k, void (*kfree)(void*))
203 return sc_phash_base::remove((const void*) k, kfree);
207 return sc_phash_base::remove_by_contents((const void*) c);
209 int remove_by_contents(bool (*predicate)(const void*, void*), void* arg)
213 int remove_by_contents(const void* c, void (*kfree)(void*))
217 int remove_by_contents(bool (*predicate)(const void*, void*), void* arg, void (*kfree)(void*))
223 return sc_phash_base::lookup((const void*) k, (void**) pc);
227 return sc_phash_base::contains((const void*) k);
231 return (C) sc_phash_base::operator[]((const void*) k);
243 void reset(sc_phash<K,C>* t) { sc_phash_base_iter::reset(t); }
244 void reset(sc_phash<K,C>& t) { sc_phash_base_iter::reset(t); }
250 return (C) sc_phash_base_iter::set_contents((void*) c);
263 void* (*kdup)(const void*); //eliminated braces around void* -- Amit
264 void (*kfree)(void*);
275 void* (*kdup_fn)(const void*) = 0,
276 void (*kfree_fn)(void*) = 0 )
277 : sc_phash_base((void*) def, size, density, grow, reorder, hash_fn, cmpr_fn)
286 void erase()
290 void copy(const sc_pdhash<K,C>& b) { sc_phash_base::copy(b, kdup, kfree); }
291 int insert(K k, C c) { return sc_phash_base::insert((void*) k, (void*) c, kdup); }
292 int insert(K k) { return sc_phash_base::insert((void*) k, default_value, kdup); }
295 return sc_phash_base::insert_if_not_exists((void*) k, (void*) c, kdup);
299 return sc_phash_base::insert_if_not_exists((void*) k, default_value, kdup);
301 int remove(K k) { return sc_phash_base::remove((const void*) k, kfree); }
304 return sc_phash_base::remove((const void*) k, (void**) pk, (void**) pc);
308 return sc_phash_base::remove_by_contents((const void*) c, kfree);
310 int remove_by_contents(bool (*predicate)(const void*, void*), void* arg)
316 return sc_phash_base::lookup((const void*) k, (void**) pc);
320 return sc_phash_base::contains((const void*) k);
324 return (C) sc_phash_base::operator[]((const void*) k);
335 void reset(sc_pdhash<K,C>* t) { sc_phash_base_iter::reset(t); }
336 void reset(sc_pdhash<K,C>& t) { sc_phash_base_iter::reset(t); }
338 void remove() { sc_phash_base_iter::remove(((sc_pdhash<K,C>*) table)->kfree); }
343 return (C) sc_phash_base_iter::set_contents((void*) c);
347 extern int sc_strhash_cmp( const void*, const void* );
348 extern void sc_strhash_kfree(void*);
349 extern void* sc_strhash_kdup(const void*);
366 unsigned (*hash_fn)(const void*) = default_str_hash_fn,
367 int (*cmpr_fn)(const void*, const void*) = sc_strhash_cmp )
368 : sc_phash_base((void*) def, size, density, grow, reorder, hash_fn, cmpr_fn)
377 void erase() { sc_phash_base::erase(sc_strhash_kfree); }
378 void copy(const sc_strhash<C>* b) { sc_phash_base::copy(*b, sc_strhash_kdup, sc_strhash_kfree); }
379 void copy(const sc_strhash<C>& b) { sc_phash_base::copy(b, sc_strhash_kdup, sc_strhash_kfree); }
381 int insert(char* k, C c) { return sc_phash_base::insert((void*) k, (void*) c, sc_strhash_kdup); }
382 int insert(char* k) { return sc_phash_base::insert((void*) k, default_value, sc_strhash_kdup); }
385 return sc_phash_base::insert_if_not_exists((void*) k, (void*) c, sc_strhash_kdup);
389 return sc_phash_base::insert_if_not_exists((void*) k, default_value, sc_strhash_kdup);
391 int remove(const char* k) { return sc_phash_base::remove((const void*) k, sc_strhash_kfree); }
394 return sc_phash_base::remove((const void*) k, (void**) pk, (void**) pc);
398 return sc_phash_base::remove_by_contents((const void*) c, sc_strhash_kfree);
400 int remove_by_contents(bool (*predicate)(const void*, void*), void* arg)
406 return sc_phash_base::lookup((const void*) k, (void** )pc);
410 return sc_phash_base::contains((const void*) k);
414 return (C) sc_phash_base::operator[]((const void*) k);
425 void reset ( sc_strhash<C>* t ) { sc_phash_base_iter::reset(t); }
426 void reset ( sc_strhash<C>& t ) { sc_phash_base_iter::reset(t); }
428 void remove() { sc_phash_base_iter::remove(sc_strhash_kfree); }
433 return (C) sc_phash_base_iter::set_contents((void*) c);