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 | enlistHead (OrderedIndex *index) |
Attach our object to the start of a linked list though an ordered index. | |
void | enlistTail (OrderedIndex *index) |
Attach our object to the end of a linked list though an ordered index. | |
void | enlist (OrderedIndex *index) |
Attach our object to a linked list. | |
bool | isHead (void) const |
Test if we are at the head of a list. | |
bool | isTail (void) const |
Test if we are at the end of a list. | |
LinkedList * | getPrev (void) const |
Get previous node in the list for reverse iteration. | |
LinkedList * | getNext (void) const |
Get next node in the list when iterating. | |
void | insertTail (LinkedList *object) |
Insert object behind our object. | |
void | insertHead (LinkedList *object) |
Insert object in front of our object. | |
virtual void | insert (LinkedList *object) |
Insert object, method in derived object. | |
void | operator+= (LinkedList *object) |
Insert object behind our object. | |
void | operator-= (LinkedList *object) |
Insert object in front of our object. | |
void | operator*= (LinkedList *object) |
Insert object in list with our object. | |
Protected Member Functions | |
LinkedList (OrderedIndex *index) | |
Construct and add our object to an existing double linked list at end. | |
LinkedList () | |
Construct an unlinked object. | |
virtual | ~LinkedList () |
Delete linked list object. | |
Protected Attributes | |
LinkedList * | prev |
OrderedIndex * | root |
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.
Definition at line 669 of file linked.h.
LinkedList::LinkedList | ( | OrderedIndex * | index | ) | [protected] |
Construct and add our object to an existing double linked list at end.
index | of linked list we are listed in. |
virtual LinkedList::~LinkedList | ( | ) | [protected, virtual] |
Delete linked list object.
If it is a member of a list of objects, then the list is reformed around us.
void LinkedList::enlist | ( | OrderedIndex * | index | ) | [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 OrderedObject.
void LinkedList::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. |
Reimplemented from OrderedObject.
void LinkedList::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. |
Reimplemented from OrderedObject.
LinkedList* LinkedList::getNext | ( | void | ) | const [inline] |
Get next node in the list when iterating.
Reimplemented from OrderedObject.
Definition at line 744 of file linked.h.
LinkedList* LinkedList::getPrev | ( | void | ) | const [inline] |
virtual void LinkedList::insert | ( | LinkedList * | object | ) | [virtual] |
Insert object, method in derived object.
object | to add to list. |
void LinkedList::insertHead | ( | LinkedList * | object | ) |
Insert object in front of our object.
object | to add to list. |
void LinkedList::insertTail | ( | LinkedList * | object | ) |
Insert object behind our object.
object | to add to list. |
bool LinkedList::isHead | ( | void | ) | const [inline] |
bool LinkedList::isTail | ( | void | ) | const [inline] |
void LinkedList::operator*= | ( | LinkedList * | object | ) | [inline] |
void LinkedList::operator+= | ( | LinkedList * | object | ) | [inline] |
void LinkedList::operator-= | ( | LinkedList * | object | ) | [inline] |