Intrusive Containers
|
#include <DListIn.h>
Public Member Functions | |
DListInNode (R *root=0) | |
DListInNode (R &) | |
~DListInNode () | |
void | addTo (R &root) |
void | addTo (R *root) |
void | addToFront (R &root) |
void | addToFront (R *root) |
void | addToEnd (R &root) |
void | addToEnd (R *root) |
void | addAfter (N &node) |
void | addAfter (N *node) |
void | remove () |
R * | root () const |
Return pointer to list we are on. More... | |
N * | next () const |
Return pointer to next node on list. More... | |
N * | prev () const |
Return pointer to previous node on list. More... | |
Friends | |
class | DListInRoot< R, N, n > |
Intrusive Doubly Linked List, Node.
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. |
DListInNode< R, N, n >::DListInNode | ( | R * | root = 0 | ) |
Constructor.
root | Pointer to list for node to be added to (if not NULL). |
DListInNode< R, N, n >::DListInNode | ( | R & | root | ) |
Constructor.
root | list we are to be added to. |
DListInNode< R, N, n >::~DListInNode | ( | ) |
Destructor.
Remove us from we are on, if any.
|
inline |
Add ourself to a list after another node.
node | The node to add ourself after. If node is not on a list, do nothing. |
|
inline |
Add ourself to a list after another node.
node | The node to add ourself after. If Node is NULL, or not on a list, do nothing. |
void DListInNode< R, N, n >::addTo | ( | R & | root | ) |
Add ourself to a list at "natural" postion. Note that this is the front for singly linked lists, and the end for doubly linked lists.
root | List to add to. |
void DListInNode< R, N, n >::addTo | ( | R * | root | ) |
Add ourself to a list at "natural" postion. Note that this is the front for singly linked lists, and the end for doubly linked lists.
root | List to add to. |
|
inline |
Add ourselfs to the end of a list
root | List to add to. |
|
inline |
Add ourselfs to the End of a list
root | List to add to. If NULL, just remove from all lists. |
|
inline |
Add ourselfs to the front of a list
root | List to add to. |
|
inline |
Add ourselfs to the front of a list
root | List to add to. If NULL, just remove from all lists. |
|
inline |
Return pointer to next node on list.
|
inline |
Return pointer to previous node on list.
|
inline |
Remove node from whatever list it is on, if it is on a list.
|
inline |
Return pointer to list we are on.
|
friend |