pointer_hash< contents > Class Template Reference

#include <pointer_hash.h>

Inheritance diagram for pointer_hash< contents >:

Inheritance graph
[legend]
Collaboration diagram for pointer_hash< contents >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef bool apply_function (const void *&key, contents &current, 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_setids () 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.

Detailed Description

template<class contents>
class pointer_hash< contents >

Definition at line 32 of file pointer_hash.h.


Member Typedef Documentation

template<class contents>
typedef bool pointer_hash< contents >::apply_function(const void *&key, contents &current, 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.


Constructor & Destructor Documentation

template<class contents>
pointer_hash< contents >::pointer_hash ( int  max_bits  ) 

Definition at line 25 of file pointer_hash.cpp.

template<class contents>
pointer_hash< contents >::~pointer_hash (  ) 

Definition at line 31 of file pointer_hash.cpp.

References WHACK().


Member Function Documentation

template<class contents>
const pointer_set & pointer_hash< contents >::ids (  )  const

Definition at line 35 of file pointer_hash.cpp.

Referenced by pointer_hash< contents >::ids().

template<class contents>
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().

template<class contents>
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().

template<class contents>
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().

template<class contents>
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().

template<class contents>
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().

template<class contents>
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().


The documentation for this class was generated from the following files:
Generated on Fri Nov 28 04:30:55 2008 for HOOPLE Libraries by  doxygen 1.5.1