#include <linked.h>
Inheritance diagram for ucommon::OrderedIndex:
Public Member Functions | |
void | add (OrderedObject *ordered) |
Add an object into the ordered index. | |
LinkedObject * | begin (void) |
Return first object in list for iterators. | |
unsigned | count (void) |
Count of objects this list manages. | |
LinkedObject * | end (void) |
Return last object in list for iterators. | |
LinkedObject * | find (unsigned offset) |
Find a specific member in the ordered list. | |
LinkedObject * | get (void) |
Get (pull) object off the list. | |
LinkedObject * | getIndexed (unsigned index) |
Get an indexed member from the ordered index. | |
LinkedObject ** | index (void) |
Return a pointer to the head of the list. | |
virtual void | lock_index (void) |
Used to synchronize lists managed by multiple threads. | |
LinkedObject * | operator * () |
Return head object pointer. | |
void | operator *= (OrderedObject *object) |
Add object to our list. | |
OrderedIndex & | operator= (OrderedIndex &object) |
Assign ordered index. | |
OrderedIndex (OrderedIndex &source) | |
OrderedIndex () | |
Create and initialize an empty index. | |
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. | |
Protected Member Functions | |
void | copy (OrderedIndex &source) |
Protected Attributes | |
OrderedObject * | head |
OrderedObject * | tail |
Friends | |
class | DLinkedObject |
class | LinkedList |
class | NamedObject |
class | OrderedObject |
This index holds a pointer to the head and tail of an ordered list of linked objects. Fundamental methods for supporting iterators are also provided.
Definition at line 175 of file linked.h.
void ucommon::OrderedIndex::add | ( | OrderedObject * | ordered | ) |
Add an object into the ordered index.
ordered | object to add to the index. |
LinkedObject* ucommon::OrderedIndex::begin | ( | void | ) | [inline] |
Return first object in list for iterators.
Reimplemented in ucommon::keylist< T >.
Definition at line 268 of file linked.h.
Referenced by ucommon::linked_pointer< T >::linked_pointer(), and ucommon::linked_pointer< T >::operator=().
unsigned ucommon::OrderedIndex::count | ( | void | ) |
Count of objects this list manages.
Reimplemented in ucommon::Queue.
LinkedObject* ucommon::OrderedIndex::end | ( | void | ) | [inline] |
Return last object in list for iterators.
Reimplemented in ucommon::keylist< T >.
LinkedObject* ucommon::OrderedIndex::find | ( | unsigned | offset | ) |
Find a specific member in the ordered list.
offset | to member to find. |
LinkedObject* ucommon::OrderedIndex::get | ( | void | ) |
Get (pull) object off the list.
The start of the list is advanced to the next object.
LinkedObject* ucommon::OrderedIndex::getIndexed | ( | unsigned | index | ) | [inline] |
Get an indexed member from the ordered index.
index | of member to fetch. |
LinkedObject** ucommon::OrderedIndex::index | ( | void | ) |
Return a pointer to the head of the list.
This allows the head pointer to be used like a simple root list pointer for pure LinkedObject based objects.
Reimplemented in ucommon::keylist< T >.
virtual void ucommon::OrderedIndex::lock_index | ( | void | ) | [virtual] |
Used to synchronize lists managed by multiple threads.
A derived locking method would be invoked.
LinkedObject* ucommon::OrderedIndex::operator * | ( | ) | [inline] |
void ucommon::OrderedIndex::operator *= | ( | OrderedObject * | object | ) |
Add object to our list.
object | to add. |
OrderedIndex& ucommon::OrderedIndex::operator= | ( | OrderedIndex & | object | ) | [inline] |
Assign ordered index.
object | to copy from. |
Definition at line 289 of file linked.h.
References ucommon::copy().
Here is the call graph for this function:
virtual void ucommon::OrderedIndex::unlock_index | ( | void | ) | [virtual] |
Used to synchronize lists managed by multiple threads.
A derived unlocking method would be invoked.