Intrusive Containers
Public Member Functions | Friends | List of all members
DListInNode< R, N, n > Class Template Reference

#include <DListIn.h>

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

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 >
 

Detailed Description

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

Intrusive Doubly Linked List, Node.

Template Parameters
LThe class that will be the owner of the List. Must derive from DListInRoot<R, N, n>
NThe class that will be the nodes of the List. Must derive from DListInNode<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
DListInRoot

Constructor & Destructor Documentation

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

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>
DListInNode< R, N, n >::DListInNode ( R &  root)

Constructor.

Parameters
rootlist we are to be added to.

Here is the call graph for this function:

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

Destructor.

Remove us from we are on, if any.

Member Function Documentation

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

Add ourself to a list after another node.

Parameters
nodeThe node to add ourself after. If node is not on a list, do nothing.

Here is the caller graph for this function:

template<class R , class N , int n>
void DListInNode< R, N, n >::addAfter ( N *  node)
inline

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.

Here is the call graph for this function:

template<class R , class N , int n>
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.

Parameters
rootList to add to.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class R , class N , int n>
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.

Parameters
rootList to add to.

Here is the call graph for this function:

template<class R , class N , int n>
void DListInNode< R, N, n >::addToEnd ( R &  root)
inline

Add ourselfs to the end of a list

Parameters
rootList to add to.

Here is the call graph for this function:

template<class R , class N , int n>
void DListInNode< R, N, n >::addToEnd ( R *  root)
inline

Add ourselfs to the End of a list

Parameters
rootList to add to. If NULL, just remove from all lists.

Here is the call graph for this function:

template<class R , class N , int n>
void DListInNode< R, N, n >::addToFront ( R &  root)
inline

Add ourselfs to the front of a list

Parameters
rootList to add to.

Here is the call graph for this function:

Here is the caller graph for this function:

template<class R , class N , int n>
void DListInNode< R, N, n >::addToFront ( R *  root)
inline

Add ourselfs to the front of a list

Parameters
rootList to add to. If NULL, just remove from all lists.

Here is the call graph for this function:

template<class R , class N , int n>
N* DListInNode< R, N, n >::next ( ) const
inline

Return pointer to next node on list.

template<class R , class N , int n>
N* DListInNode< R, N, n >::prev ( ) const
inline

Return pointer to previous node on list.

template<class R , class N , int n>
void DListInNode< R, N, n >::remove ( )
inline

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

template<class R , class N , int n>
R* DListInNode< R, N, n >::root ( ) const
inline

Return pointer to list we are on.

Here is the caller graph for this function:

Friends And Related Function Documentation

template<class R , class N , int n>
friend class DListInRoot< R, N, n >
friend

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