Intrusive Containers
|
#include <TreeIn.h>
Protected Member Functions | |
TreeInRoot () | |
~TreeInRoot () | |
int | compare (N const &node1, N const &node2) const |
int | compareKey (N const &node, K key) const |
virtual void | add (N &node) |
void | add (N *node) |
void | remove (N &node) |
void | remove (N *node) |
N * | find (K key) const |
N * | base () const |
N * | first () const |
N * | last () const |
void | check () const |
Friends | |
class | TreeInNode< R, N, K, n > |
Intrusive Binary Tree, Root.
L | The class that will be the owner of the Tree. Must derive from TreeInRoot<R, N, K, n> |
N | The class that will be the nodes of the Tree. Must derive from TreeInNode<R, N, K, 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.
Doesn't actually call remove on every node to avoid possible unneeded rebalencing, just manually unlinks all nodes.
|
inlineprotectedvirtual |
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 different list 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 |
|
inlineprotected |
|
protected |
|
protected |
|
protected |
find a node
|
inlineprotected |
|
inlineprotected |
|
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. |
|
friend |