Intrusive Containers
|
#include <DListIn.h>
Public Member Functions | |
DListInRoot () | |
~DListInRoot () | |
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 |
N * | last () const |
Friends | |
class | DListInNode< R, N, n > |
Intrusive Doubly Linked List, List.
L | The class that will be the owner of the List. Must derive from DListInRoot<R, N, n> |
N | The class that will be the nodes of the List. Must derive from DListInNode<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. |
DListInRoot< R, N, n >::DListInRoot | ( | ) |
Constructor.
Starts us as an empty list.
DListInRoot< R, N, n >::~DListInRoot | ( | ) |
Destructor.
Removes all nodes attached to us.
|
inline |
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 |
|
inline |
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 |
|
inline |
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 |
|
inline |
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 |
|
inline |
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 |
|
inline |
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 |
|
inline |
|
inline |
|
inline |
Remove Node from List
node | node to be removed. If node is not on this list, nothing will be done. |
|
inline |
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. |
|
friend |