Intrusive Containers
Protected Member Functions | List of all members
ListInNode< R, N, n > Class Template Reference

#include <ListIn.h>

Collaboration diagram for ListInNode< R, N, n >:
Collaboration graph

Protected Member Functions

 ListInNode (R &root)
 
 ListInNode (R *root=0)
 
 ~ListInNode ()
 
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...
 

Detailed Description

template<class R, class N, int n>
class ListInNode< R, N, n >

Intrusive Singly Linked List, Node.

Template Parameters
LThe class that will be the owner of the List. Must derive from ListInRoot<R, N, n>
NThe class that will be the nodes of the List. Must derive from ListInNode<R, N, n>
nA numerical parameter to allow a give List/Node combination to have multiple list-node relationships. Defaults to 0 if not provided.
See also
ListInRoot

Constructor & Destructor Documentation

template<class R , class N , int n>
ListInNode< R, N, n >::ListInNode ( R &  root)
protected

Constructor.

Parameters
rootlist we are to be added to.

Here is the call graph for this function:

template<class R , class N , int n>
ListInNode< R, N, n >::ListInNode ( R *  root = 0)
protected

Constructor.

Parameters
rootPointer to list for node to be added to (if not NULL).

Here is the call graph for this function:

template<class R , class N , int n>
ListInNode< R, N, n >::~ListInNode ( )
protected

Destructor.

Remove us from we are on, if any.

Member Function Documentation

template<class R , class N , int n>
void ListInNode< R, N, n >::addAfter ( N &  node)
inlineprotected

Add ourself to a list after another node.

Parameters
nodeThe node to add ourself after. If node is not on a list, do nothing.
template<class R , class N , int n>
void ListInNode< R, N, n >::addAfter ( N *  node)
inlineprotected

Add ourself to a list after another node.

Parameters
nodeThe node to add ourself after. If Node is NULL, or not on a list, do nothing.
template<class R , class N , int n>
void ListInNode< R, N, n >::addTo ( R &  root)
protected

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.

Parameters
rootList to add to.

Here is the caller graph for this function:

template<class R , class N , int n>
void ListInNode< R, N, n >::addTo ( R *  root)
protected

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.

Parameters
rootList to add to.
template<class R , class N , int n>
void ListInNode< R, N, n >::addToEnd ( R &  root)
inlineprotected

Add ourselfs to the end of a list

Parameters
rootList to add to.
template<class R , class N , int n>
void ListInNode< R, N, n >::addToEnd ( R *  root)
inlineprotected

Add ourselfs to the End of a list

Parameters
rootList to add to. If NULL, just remove from all lists.
template<class R , class N , int n>
void ListInNode< R, N, n >::addToFront ( R &  root)
inlineprotected

Add ourselfs to the front of a list

Parameters
rootList to add to.
template<class R , class N , int n>
void ListInNode< R, N, n >::addToFront ( R *  root)
inlineprotected

Add ourselfs to the front of a list

Parameters
rootList to add to. If NULL, just remove from all lists.
template<class R , class N , int n>
N* ListInNode< R, N, n >::next ( ) const
inlineprotected

Return pointer to next Node on List.

template<class R , class N , int n>
void ListInNode< R, N, n >::remove ( )
inlineprotected

Remove node from whatever list it is on, if it is on a list.

Here is the caller graph for this function:

template<class R , class N , int n>
R* ListInNode< R, N, n >::root ( ) const
inlineprotected

Return pointer to List we are on.


The documentation for this class was generated from the following files: