Public Member Functions |
void | add (const char *name, T &object) |
| Add a typed object derived from NamedObject to the hash map by name.
|
void | add (const char *name, T *object) |
| Add a typed object derived from NamedObject to the hash map by name.
|
T * | begin (void) const |
| Find first typed object in hash map to iterate.
|
unsigned | count (void) const |
| Count the number of typed objects in our hash map.
|
T * | get (const char *name) const |
| Find a typed object derived from NamedObject in the hash map by name.
|
T ** | index (void) const |
| Convert our hash map into a linear object pointer array.
|
unsigned | limit (void) const |
| Retrieve key size to use in NamedObject constructors.
|
T * | next (T *current) const |
| Find next typed object in hash map for iteration.
|
T & | operator[] (const char *name) const |
| Find a typed object derived from NamedObject in the hash map by name.
|
T * | remove (const char *name) |
| Remove a typed object derived from NamedObject to the hash map by name.
|
NamedObject ** | root (void) const |
| Retrieve root of index to use in NamedObject constructors.
|
T ** | sort (void) const |
| Convert our hash map into an alphabetically sorted linear object pointer array.
|
| ~keymap () |
| Destroy the hash map by puring the index chains.
|
template<class T, unsigned M = 177>
class ucc::keymap< T, M >
A template 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.
- Author:
- David Sugar <dyfet@gnutelephony.org>
Definition at line 1716 of file linked.h.
template<class T , unsigned M = 177>
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.
- Returns:
- sorted array of typed named object pointers.
Definition at line 1819 of file linked.h.