Node< T > Class Template Reference

#include <node.h>

List of all members.

Public Member Functions

 Node (const T &=T())
void setObject (const T &)
T & getObject ()
void setNextPtr (Node< T > *)
Node< T > * getNextPtr () const


Detailed Description

template<typename T>
class Node< T >

Uses a template class to implement a node for a singly-linked list.

Author:
Mark Maloof
Version:
1.0, 28 August 2007


Constructor & Destructor Documentation

template<typename T>
Node< T >::Node ( const T &  object = T()  ) 

Constructor. Stores the object, which may be the default object, in this node. Sets this node's next pointer to null.

Parameters:
object the object to be stored in this node


Member Function Documentation

template<typename T>
void Node< T >::setObject ( const T &  object  ) 

Sets the object of this node.

Parameters:
object the object to be stored in this node

template<typename T>
T & Node< T >::getObject (  ) 

Returns a reference to the object stored in this node

Returns:
a reference to the object

template<typename T>
void Node< T >::setNextPtr ( Node< T > *  nextPtr  ) 

Sets the next pointer of this node.

Parameters:
nextPtr the address to be stored in this node

template<typename T>
Node< T > * Node< T >::getNextPtr (  )  const

Returns the pointer stored in this node.

Returns:
a pointer to the next node


The documentation for this class was generated from the following file:
Generated on Wed Sep 12 10:34:23 2007 by  doxygen 1.5.1