A templated class for a hash map. More...
#include <linked.h>
Public Member Functions | |
~keymap () | |
Destroy the hash map by puring the index chains. | |
NamedObject ** | root (void) const |
Retrieve root of index to use in NamedObject constructors. | |
unsigned | limit (void) const |
Retreive key size to use in NamedObject constructors. | |
T * | get (const char *name) const |
Find a typed object in the hash map by name. | |
T * | begin (void) const |
Find first typed object in hash map to iterate. | |
T * | next (T *current) const |
Find next typed object in hash map for iteration. | |
unsigned | count (void) const |
Count the number of typed objects in our hash map. | |
T ** | index (void) const |
Convert our hash map into a linear object pointer array. | |
T ** | sort (void) const |
Convert our hash map into an alphabetically sorted linear object pointer array. |
A templated class for a hash map.
This provides a has map index object as a chain of keyindex selected linked pointers of a specified size. This is used for the index and size values for NamedObject's which are listed on a hash map.
Definition at line 1416 of file linked.h.
T* keymap< T, M >::begin | ( | void | ) | const [inline] |
unsigned keymap< T, M >::count | ( | void | ) | const [inline] |
T* keymap< T, M >::get | ( | const char * | name | ) | const [inline] |
T** keymap< T, M >::index | ( | void | ) | const [inline] |
unsigned keymap< T, M >::limit | ( | void | ) | const [inline] |
Retreive key size to use in NamedObject constructors.
T* keymap< T, M >::next | ( | T * | current | ) | const [inline] |
NamedObject** keymap< T, M >::root | ( | void | ) | const [inline] |
Retrieve root of index to use in NamedObject constructors.
T** keymap< T, M >::sort | ( | void | ) | const [inline] |
Convert our hash map into an alphabetically sorted linear object pointer array.
The object pointer array is created from the heap and must be deleted when no longer used.
Definition at line 1487 of file linked.h.