UCommon
|
A template for ordered index of typed name key mapped objects. More...
#include <linked.h>
Public Member Functions | |
T * | begin (void) |
Return first item in ordered list. | |
T * | create (char *name) |
Create a new typed named object with default constructor. | |
T * | end (void) |
Return last item in ordered list. | |
T * | find (char *name) |
Find a specific object by name. | |
T ** | index (void) |
Convert our linked list into a linear object pointer array. | |
T * | next (LinkedObject *current) |
Iterate next object in list. | |
T * | offset (unsigned offset) |
T & | operator[] (unsigned offset) |
Retrieve a specific object by position in list. | |
T & | operator[] (char *name) |
NamedObject ** | root (void) |
Return a root node pointer to use in NamedObject constructors. | |
T ** | sort (void) |
Convert our linked list into an alphabetically sorted linear object pointer array. |
A template for ordered index of typed name key mapped objects.
This is used to hold an iterable linked list of typed named objects where we can find objects by their name as well as through iteration.
T* ucommon::keylist< T >::begin | ( | void | ) | [inline] |
Return first item in ordered list.
This is commonly used to iterate the list.
Reimplemented from ucommon::OrderedIndex.
T* ucommon::keylist< T >::create | ( | char * | name | ) | [inline] |
T* ucommon::keylist< T >::end | ( | void | ) | [inline] |
Return last item in ordered list.
This is commonly used to determine end of list iteration.
Reimplemented from ucommon::OrderedIndex.
T* ucommon::keylist< T >::find | ( | char * | name | ) | [inline] |
T** ucommon::keylist< T >::index | ( | void | ) | [inline] |
Convert our linked list into a linear object pointer array.
The object pointer array is created from the heap and must be deleted when no longer used.
Reimplemented from ucommon::OrderedIndex.
T* ucommon::keylist< T >::next | ( | LinkedObject * | current | ) | [inline] |
T& ucommon::keylist< T >::operator[] | ( | unsigned | offset | ) | [inline] |
NamedObject** ucommon::keylist< T >::root | ( | void | ) | [inline] |
Return a root node pointer to use in NamedObject constructors.
T** ucommon::keylist< T >::sort | ( | void | ) | [inline] |