DNode< T > Class Template Reference

Node to be used with DList Copyright 2010 David Coss. More...

#include <DNode.h>


Public Member Functions

 DNode ()
 Empty Constructor.
 DNode (const T &)
 Creates a node containing an object equal to the provided object.
 ~DNode ()
void detachPrev ()
 Removes the previous node.
void detachNext ()
 Removes the next node.
DNodegetNext ()
 Returns a pointer to the next node.
DNodegetPrev ()
 Returns a pointer to the previous node.
DNodesetNext (DNode *newNext)
 Sets the next node.
DNodesetPrev (DNode *newPrev)
 Sets the previous node.
const T *const getItem () const
 Returns a constant pointer to the item contained in the node.
getItemCopy ()
 Returns a new object equal to the item contained in the node.
void setItem (const T &)
 Sets the value of the item contained in the node.

Private Attributes

T * stuff
DNodeprev
DNodenext


Detailed Description

template<class T>
class DNode< T >

Node to be used with DList Copyright 2010 David Coss.

Constructor & Destructor Documentation

template<class T >
DNode< T >::DNode (  )  [inline]

Empty Constructor.

Item pointer equals zero, as do next and previous node pointers

References DNode< T >::next, DNode< T >::prev, and DNode< T >::stuff.

template<class T >
DNode< T >::DNode ( const T &  item  )  [inline]

Creates a node containing an object equal to the provided object.

References DNode< T >::next, DNode< T >::prev, and DNode< T >::stuff.

template<class T >
DNode< T >::~DNode (  )  [inline]

References DNode< T >::stuff.


Member Function Documentation

template<class T >
void DNode< T >::detachNext (  )  [inline]

Removes the next node.

References DNode< T >::next.

template<class T >
void DNode< T >::detachPrev (  )  [inline]

Removes the previous node.

References DNode< T >::prev.

template<class T >
const T* const DNode< T >::getItem (  )  const [inline]

Returns a constant pointer to the item contained in the node.

References DNode< T >::stuff.

template<class T >
T DNode< T >::getItemCopy (  )  [inline]

Returns a new object equal to the item contained in the node.

References DNode< T >::stuff.

template<class T >
DNode* DNode< T >::getNext (  )  [inline]

template<class T >
DNode* DNode< T >::getPrev (  )  [inline]

Returns a pointer to the previous node.

References DNode< T >::prev.

Referenced by DList< T >::deleteNode().

template<class T >
void DNode< T >::setItem ( const T &  newItem  )  [inline]

Sets the value of the item contained in the node.

References DNode< T >::stuff.

template<class T >
DNode< T > * DNode< T >::setNext ( DNode< T > *  newNext  )  [inline]

Sets the next node.

A pointer to the pre-existing node is returned.

References DNode< T >::next.

Referenced by DList< T >::deleteNode().

template<class T >
DNode< T > * DNode< T >::setPrev ( DNode< T > *  newPrev  )  [inline]

Sets the previous node.

A pointer to the pre-existing node is returned.

References DNode< T >::prev.

Referenced by DList< T >::add().


Field Documentation

template<class T >
DNode* DNode< T >::next [private]

template<class T >
DNode* DNode< T >::prev [private]

template<class T >
T* DNode< T >::stuff [private]


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

Generated on Fri Jun 11 21:02:35 2010 for libdnstd by  doxygen 1.5.7.1