ucommon
|
A template for ordered index of typed name key mapped objects. More...
#include <linked.h>
Public Types | |
typedef linked_pointer< T > | iterator |
Convenience typedef for iterative pointer. | |
Public Member Functions | |
T * | begin (void) |
Return first item in ordered list. More... | |
T * | create (const char *name) |
Create a new typed named object with default constructor. More... | |
T * | end (void) |
Return last item in ordered list. More... | |
T * | find (const char *name) |
Find a specific object by name. More... | |
T ** | index (void) |
Convert our linked list into a linear object pointer array. More... | |
T * | next (LinkedObject *current) |
Iterate next object in list. More... | |
T * | offset (unsigned offset) |
T & | operator[] (unsigned offset) |
Retrieve a specific object by position in list. More... | |
T & | operator[] (const char *name) |
NamedObject ** | root (void) |
Return a root node pointer to use in NamedObject constructors. More... | |
T ** | sort (void) |
Convert our linked list into an alphabetically sorted linear object pointer array. More... | |
![]() | |
void | add (OrderedObject *ordered) |
Add an object into the ordered index. More... | |
LinkedObject * | begin (void) const |
Return first object in list for iterators. More... | |
unsigned | count (void) const |
Count of objects this list manages. More... | |
LinkedObject * | end (void) const |
Return last object in list for iterators. More... | |
LinkedObject * | find (unsigned offset) const |
Find a specific member in the ordered list. More... | |
LinkedObject * | get (void) |
Get (pull) object off the list. More... | |
LinkedObject * | getIndexed (unsigned index) const |
Get an indexed member from the ordered index. More... | |
LinkedObject ** | index (void) const |
Return a pointer to the head of the list. More... | |
virtual void | lock_index (void) |
Used to synchronize lists managed by multiple threads. More... | |
LinkedObject * | operator* () const |
Return head object pointer. More... | |
void | operator*= (OrderedObject *object) |
Add object to our list. More... | |
OrderedIndex & | operator= (const OrderedIndex &object) |
Assign ordered index. More... | |
OrderedIndex () | |
Create and initialize an empty index. | |
OrderedIndex (const OrderedIndex &source) | |
void | purge (void) |
Purge the linked list and then set the index to empty. | |
void | reset (void) |
Reset linked list to empty without purging. | |
virtual void | unlock_index (void) |
Used to synchronize lists managed by multiple threads. More... | |
virtual | ~OrderedIndex () |
Destroy index. | |
Additional Inherited Members | |
![]() | |
void | copy (const OrderedIndex &source) |
![]() | |
OrderedObject * | head |
OrderedObject * | tail |
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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Return a root node pointer to use in NamedObject constructors.
|
inline |
Convert our linked list 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 1942 of file linked.h.