mp_lists
Linked Lists
List< T >::ListNode Class Reference

The ListNode class is private to the List class via the principle of encapsulation—the end user does not need to know our node-based implementation details. More...

Collaboration diagram for List< T >::ListNode:
[legend]

Public Member Functions

 ListNode ()
 Default ListNode constructor. More...
 
 ListNode (const T &ndata)
 Constructs a ListNode with the given data. More...
 

Public Attributes

ListNodenext
 A pointer to the next node in the list. More...
 
ListNodeprev
 A pointer to the previous node in the list. More...
 
const T data
 The data contained in this node. More...
 

Detailed Description

template<class T>
class List< T >::ListNode

The ListNode class is private to the List class via the principle of encapsulation—the end user does not need to know our node-based implementation details.

Constructor & Destructor Documentation

◆ ListNode() [1/2]

template<class T >
List< T >::ListNode::ListNode ( )

Default ListNode constructor.

Implemented for you.

See also
List-given.hpp

◆ ListNode() [2/2]

template<class T >
List< T >::ListNode::ListNode ( const T &  ndata)

Constructs a ListNode with the given data.

Implemented for you.

See also
List-given.hpp

Member Data Documentation

◆ data

template<class T >
const T List< T >::ListNode::data

The data contained in this node.

We do not allow you to modify node data, so it is const.

◆ next

template<class T >
ListNode* List< T >::ListNode::next

A pointer to the next node in the list.

May be NULL if one does not exist.

◆ prev

template<class T >
ListNode* List< T >::ListNode::prev

A pointer to the previous node in the list.

May be NULL if one does not exist.


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