#include <pointer_hash.h>
Inheritance diagram for pointer_hash< contents >:


Public Types | |
| typedef bool | apply_function (const void *&key, contents ¤t, void *data_link) |
| the "apply_function" is what a user of the "apply" method must supply. | |
Public Member Functions | |
| pointer_hash (int max_bits) | |
| ~pointer_hash () | |
| const pointer_set & | ids () const |
| void | ids (pointer_set &ids) const |
| provides the current list of valid identifiers. | |
| outcome | add (void *key, contents *to_store) |
| overrides base add() and ensures that the id list stays up to date. | |
| contents * | acquire (void *key) |
| overrides base acquire() by ensuring that the ids stay up to date. | |
| bool | zap (void *key) |
| overrides base zap() method plus keeps id list updated. | |
| void | reset () |
| overrides base reset() and ensures that the id list stays up to date. | |
| void | apply (apply_function *to_apply, void *data_link) |
| operates on every item in the pointer_hash table. | |
Definition at line 32 of file pointer_hash.h.
| typedef bool pointer_hash< contents >::apply_function(const void *&key, contents ¤t, void *data_link) |
the "apply_function" is what a user of the "apply" method must supply.
the function will be called on every item in the table unless one of the invocations returns false; this causes the apply process to stop. the "data_link" provides a way for the function to refer back to an parent class of some sort.
Reimplemented from hash_table< void *, contents >.
Definition at line 51 of file pointer_hash.h.
| pointer_hash< contents >::pointer_hash | ( | int | max_bits | ) |
Definition at line 25 of file pointer_hash.cpp.
| pointer_hash< contents >::~pointer_hash | ( | ) |
| const pointer_set & pointer_hash< contents >::ids | ( | ) | const |
| void pointer_hash< contents >::ids | ( | pointer_set & | ids | ) | const |
provides the current list of valid identifiers.
Definition at line 38 of file pointer_hash.cpp.
References pointer_hash< contents >::ids().
| outcome pointer_hash< contents >::add | ( | void * | key, | |
| contents * | to_store | |||
| ) |
overrides base add() and ensures that the id list stays up to date.
Definition at line 41 of file pointer_hash.cpp.
References hash_table< key_type, contents >::add(), and basis::set< contents >::add().
| contents * pointer_hash< contents >::acquire | ( | void * | key | ) |
overrides base acquire() by ensuring that the ids stay up to date.
Definition at line 48 of file pointer_hash.cpp.
References hash_table< key_type, contents >::acquire(), and basis::set< contents >::remove().
| bool pointer_hash< contents >::zap | ( | void * | key | ) |
overrides base zap() method plus keeps id list updated.
Definition at line 55 of file pointer_hash.cpp.
References basis::set< contents >::remove(), and hash_table< key_type, contents >::zap().
| void pointer_hash< contents >::reset | ( | ) |
overrides base reset() and ensures that the id list stays up to date.
Reimplemented from hash_table< void *, contents >.
Definition at line 62 of file pointer_hash.cpp.
References basis::set< contents >::clear(), and hash_table< key_type, contents >::reset().
| void pointer_hash< contents >::apply | ( | apply_function * | to_apply, | |
| void * | data_link | |||
| ) |
operates on every item in the pointer_hash table.
Reimplemented from hash_table< void *, contents >.
Definition at line 69 of file pointer_hash.cpp.
References basis::set< contents >::elements(), hash_table< key_type, contents >::find(), and basis::set< contents >::remove().
1.5.1