A template for ordered index of typed name key mapped objects.
More...
#include <linked.h>
|
T * | begin (void) |
| Return first item in ordered list.
|
|
T * | create (const char *name) |
| Create a new typed named object with default constructor.
|
|
T * | end (void) |
| Return last item in ordered list.
|
|
T * | find (const 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[] (const 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.
|
|
void | add (OrderedObject *ordered) |
| Add an object into the ordered index.
|
|
LinkedObject * | begin (void) const |
| Return first object in list for iterators.
|
|
unsigned | count (void) const |
| Count of objects this list manages.
|
|
LinkedObject * | end (void) const |
| Return last object in list for iterators.
|
|
LinkedObject * | find (unsigned offset) const |
| Find a specific member in the ordered list.
|
|
LinkedObject * | get (void) |
| Get (pull) object off the list.
|
|
LinkedObject * | getIndexed (unsigned index) const |
| Get an indexed member from the ordered index.
|
|
LinkedObject ** | index (void) const |
| Return a pointer to the head of the list.
|
|
virtual void | lock_index (void) |
| Used to synchronize lists managed by multiple threads.
|
|
LinkedObject * | operator* () const |
| Return head object pointer.
|
|
void | operator*= (OrderedObject *object) |
| Add object to our list.
|
|
OrderedIndex & | operator= (const OrderedIndex &object) |
| Assign ordered index.
|
|
| 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.
|
|
virtual | ~OrderedIndex () |
| Destroy index.
|
|
template<class T>
class ucommon::keylist< T >
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.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 1858 of file linked.h.
Return first item in ordered list.
This is commonly used to iterate the list.
- Returns
- first item in list or NULL if empty.
Definition at line 1873 of file linked.h.
Create a new typed named object with default constructor.
This creates a new object which can be deleted.
- Parameters
-
- Returns
- typed named object.
Definition at line 1890 of file linked.h.
Return last item in ordered list.
This is commonly used to determine end of list iteration.
- Returns
- last item in list or NULL if empty.
Definition at line 1881 of file linked.h.
Find a specific object by name.
- Parameters
-
- Returns
- type named object that matches or NULL if not found.
Definition at line 1906 of file linked.h.
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.
- Returns
- array of typed named object pointers.
Definition at line 1929 of file linked.h.
Iterate next object in list.
- Parameters
-
current | object we are referencing. |
- Returns
- next logical object in linked list or NULL if end.
Definition at line 1898 of file linked.h.
Retrieve a specific object by position in list.
- Parameters
-
offset | in list for object we want. |
- Returns
- type named object or NULL if past end of list.
Definition at line 1917 of file linked.h.
Return a root node pointer to use in NamedObject constructors.
- Returns
- pointer to index root.
Definition at line 1865 of file linked.h.
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.
- Returns
- array of typed named object pointers.
Definition at line 1938 of file linked.h.
The documentation for this class was generated from the following file: