34 template <
class contents>
71 template <
class contents>
77 template <
class contents>
81 template <
class contents>
84 template <
class contents>
87 template <
class contents>
94 template <
class contents>
101 template <
class contents>
108 template <
class contents>
115 template <
class contents>
118 for (
int i = 0; i < _ids->elements(); i++) {
119 int current = (*_ids)[i];
122 _ids->remove(current);
125 to_apply(current, *found, data_link);
Outcomes describe the state of completion for an operation.
Implements hashing into buckets for quick object access.
basis::outcome add(const key_type &key, contents *to_store)
Stores "to_store" into the table given its "key" for hashing.
contents * acquire(const key_type &key)
retrieves the contents held for "key" out of the table.
void reset()
removes all entries in the table and returns it to a pristine state.
bool find(const key_type &key, contents *&item_found) const
locates the item specified by the "key", if possible.
bool zap(const key_type &key)
removes the entry with the "key" specified.
A hash table for storing integers.
bool apply_function(const int &key, contents ¤t, void *data_link)
bool zap(int key)
overrides base zap() method plus keeps id list updated.
const int_set & ids() const
contents * acquire(int key)
overrides base acquire() by ensuring that the ids stay up to date.
void apply(apply_function *to_apply, void *data_link)
operates on every item in the int_hash table.
basis::outcome add(int key, contents *to_store)
overrides base add() and ensures that the id list stays up to date.
void reset()
overrides base reset() and ensures that the id list stays up to date.
void ids(int_set &ids) const
provides the current list of valid identifiers.
A simple object that wraps a templated set of ints.
Implements a hashing algorithm based on the contents stored in an object.
void WHACK(contents *&ptr)
deletion with clearing of the pointer.
A dynamic container class that holds any kind of object via pointers.