|
UCommon
|
A double linked list object. More...
#include <linked.h>


Public Member Functions | |
| void | delist (void) |
| Remove our object from the list it is currently part of. | |
| void | enlist (OrderedIndex *index) |
| Attach our object to a linked list. More... | |
| void | enlistHead (OrderedIndex *index) |
| Attach our object to the start of a linked list though an ordered index. More... | |
| void | enlistTail (OrderedIndex *index) |
| Attach our object to the end of a linked list though an ordered index. More... | |
| DLinkedObject * | getNext (void) const |
| Get next node in the list when iterating. More... | |
| DLinkedObject * | getPrev (void) const |
| Get previous node in the list for reverse iteration. More... | |
| virtual void | insert (DLinkedObject *object) |
| Insert object, method in derived object. More... | |
| void | insertHead (DLinkedObject *object) |
| Insert object in front of our object. More... | |
| void | insertTail (DLinkedObject *object) |
| Insert object behind our object. More... | |
| bool | is_head (void) const |
| Test if we are at the head of a list. More... | |
| bool | is_tail (void) const |
| Test if we are at the end of a list. More... | |
| DLinkedObject & | operator*= (DLinkedObject *object) |
| Insert object in list with our object. More... | |
| DLinkedObject & | operator+= (DLinkedObject *object) |
| Insert object behind our object. More... | |
| DLinkedObject & | operator-= (DLinkedObject *object) |
| Insert object in front of our object. More... | |
Public Member Functions inherited from ucommon::OrderedObject | |
| void | delist (OrderedIndex *index) |
| Remove our ordered object from an existing index. More... | |
| void | enlistHead (OrderedIndex *index) |
| List our ordered object at start of a linked list on an index. More... | |
| void | enlistTail (OrderedIndex *index) |
| List our ordered object at end of a linked list on an index. More... | |
| OrderedObject * | getNext (void) const |
| Get next ordered member when iterating. More... | |
Public Member Functions inherited from ucommon::LinkedObject | |
| void | delist (LinkedObject **root) |
| Locate and remove ourselves from a list of objects. More... | |
| void | enlist (LinkedObject **root) |
| Add our object to an existing linked list through a pointer. More... | |
| LinkedObject * | getNext (void) const |
| Get next effective object when iterating. More... | |
| bool | is_member (LinkedObject *list) const |
| Search to see if we are a member of a specific list. More... | |
| virtual void | release (void) |
| Release list, mark as no longer linked. More... | |
| virtual void | retain (void) |
| Retain by marking as self referenced list. More... | |
Public Member Functions inherited from ucommon::ObjectProtocol | |
| ObjectProtocol * | copy (void) |
| Retain (increase retention of) object when copying. | |
| void | operator++ (void) |
| Increase retention operator. | |
| void | operator-- (void) |
| Decrease retention operator. | |
| virtual | ~ObjectProtocol () |
| Required virtual destructor. | |
Protected Member Functions | |
| DLinkedObject (OrderedIndex *index) | |
| Construct and add our object to an existing double linked list at end. More... | |
| DLinkedObject () | |
| Construct an unlinked object. | |
| DLinkedObject (const DLinkedObject &from) | |
| virtual | ~DLinkedObject () |
| Delete linked list object. More... | |
Protected Member Functions inherited from ucommon::OrderedObject | |
| OrderedObject (OrderedIndex *index) | |
| Construct an ordered object aot end of a an index. More... | |
| OrderedObject () | |
| Construct an ordered object unattached. | |
| OrderedObject (const OrderedObject &from) | |
Protected Member Functions inherited from ucommon::LinkedObject | |
| LinkedObject (LinkedObject **root) | |
| Construct base class attached to a chain of objects. More... | |
| LinkedObject () | |
| Construct base class unattached to anyone. More... | |
| LinkedObject (const LinkedObject &from) | |
Protected Attributes | |
| DLinkedObject * | Prev |
| OrderedIndex * | Root |
Protected Attributes inherited from ucommon::LinkedObject | |
| LinkedObject * | Next |
Friends | |
| class | ObjectQueue |
Additional Inherited Members | |
Static Public Member Functions inherited from ucommon::LinkedObject | |
| static unsigned | count (const LinkedObject *root) |
| Count the number of linked objects in a list. More... | |
| static LinkedObject * | getIndexed (LinkedObject *root, unsigned index) |
| Get member by index. More... | |
| static void | purge (LinkedObject *root) |
| Release all objects from a list. More... | |
A double linked list object.
This is used as a base class for objects that will be organized through ordered double linked lists which allow convenient insertion and deletion of list members anywhere in the list.
|
protected |
Construct and add our object to an existing double linked list at end.
| index | of linked list we are listed in. |
|
protectedvirtual |
Delete linked list object.
If it is a member of a list of objects, then the list is reformed around us.
|
virtual |
Attach our object to a linked list.
The default strategy is to add to tail.
| index | of linked list we are joining. |
Reimplemented from ucommon::OrderedObject.
| void ucommon::DLinkedObject::enlistHead | ( | OrderedIndex * | index | ) |
Attach our object to the start of a linked list though an ordered index.
If we are already attached to a list we are delisted first.
| index | of linked list we are joining. |
| void ucommon::DLinkedObject::enlistTail | ( | OrderedIndex * | index | ) |
Attach our object to the end of a linked list though an ordered index.
If we are already attached to a list we are delisted first.
| index | of linked list we are joining. |
|
inline |
|
inline |
|
virtual |
Insert object, method in derived object.
| object | to add to list. |
| void ucommon::DLinkedObject::insertHead | ( | DLinkedObject * | object | ) |
Insert object in front of our object.
| object | to add to list. |
| void ucommon::DLinkedObject::insertTail | ( | DLinkedObject * | object | ) |
Insert object behind our object.
| object | to add to list. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
1.8.14