Intrusive Containers
|
#include <ListIn.h>
Protected Member Functions | |
ListInRoot () | |
~ListInRoot () | |
void | add (N &node) |
void | add (N *node) |
void | addFirst (N &node) |
void | addFirst (N *node) |
void | addLast (N &node) |
void | addLast (N *node) |
void | remove (N &node) |
void | remove (N *node) |
N * | first () const |
Return pointer to first Node on list. More... | |
Intrusive Singly Linked List, List.
L | The class that will be the owner of the List. Must derive from ListInRoot<R, N, n> |
N | The class that will be the nodes of the List. Must derive from ListInNode<R, N, n> |
n | A numerical parameter to allow a give List/Node combination to have multiple list-node relationships. Defaults to 0 if not provided. |
|
protected |
Constructor.
Starts us as an empty list.
|
protected |
Destructor.
Removes all nodes attached to us.
|
inlineprotected |
Add node to our list, at "natural" point. Note that this is the front for singly linked lists and the end for doubly linked list.
node | The node to add to the list If node is currently on a list (even us) it is removed before being added to the list |
|
inlineprotected |
Add node to our list, at "natural" point. Note that this is the front for singly linked lists and the end for doubly linked lists.
node | The node to add to the list If node is nulR, Nothing is done. If node is currently on a list (even us) it is removed before being added to the list |
|
inlineprotected |
Add node to front of our list.
node | The node to add to the list If node is currently on a list (even us) it is removed before being added to the list |
|
inlineprotected |
Add node to front of our list.
node | The node to add to the list If node is currently on a list (even us) it is removed before being added to the list |
|
inlineprotected |
Add node to end of our list. Note that this operation is O(n) on list current size. See DListInRoot to make this O(1).
node | The node to add to the list If node is currently on a list (even us) it is removed before being added to the list |
|
inlineprotected |
Add node to end of our list. Note that this operation is O(n) on list current size. See DListInRoot to make this O(1).
node | The node to add to the list If node is currently on a list (even us) it is removed before being added to the list |
|
inlineprotected |
Return pointer to first Node on list.
|
inlineprotected |
Remove Node from List
node | node to be removed. If node is not on this list, nothing will be done. |
|
inlineprotected |
Remove Node from List
node | Pointer to node to be removed. If node is null, operation will be ignored. If node is not on this list, nothing will be done. |