Rudiments
Public Member Functions | List of all members
linkedlistnode< valuetype > Class Template Reference

#include <linkedlist.h>

Inherits listnode< valuetype >.

Public Member Functions

 linkedlistnode (valuetype value)
 
 ~linkedlistnode ()
 
void setValue (valuetype value)
 
valuetype getValue ()
 
valuetypegetReference ()
 
listnode< valuetype > * getPrevious ()
 
listnode< valuetype > * getNext ()
 
- Public Member Functions inherited from object
virtual ~object ()
 

Detailed Description

template<class valuetype>
class linkedlistnode< valuetype >

The linkedlistnode class stores the values that compose a linkedlist.

Constructor & Destructor Documentation

◆ linkedlistnode()

Creates an instance of the linkedlistnode class that stores value "value".

◆ ~linkedlistnode()

Deletes this instance of the linkedlistnode class.

Member Function Documentation

◆ getNext()

template<class valuetype >
listnode< valuetype > * linkedlistnode< valuetype >::getNext ( )
inlinevirtual

Returns the next node in the linkedlist or NULL if this node is the last node in the list.

Implements listnode< valuetype >.

◆ getPrevious()

template<class valuetype >
listnode< valuetype > * linkedlistnode< valuetype >::getPrevious ( )
inlinevirtual

Returns the previous node in the linkedlist or NULL if this node is the first node in the list.

Implements listnode< valuetype >.

◆ getReference()

template<class valuetype >
valuetype & linkedlistnode< valuetype >::getReference ( )
inlinevirtual

Returns a reference to the value stored in the node.

Implements listnode< valuetype >.

◆ getValue()

template<class valuetype >
valuetype linkedlistnode< valuetype >::getValue ( )
inlinevirtual

Returns the value stored in the node.

Implements listnode< valuetype >.

◆ setValue()

template<class valuetype >
void linkedlistnode< valuetype >::setValue ( valuetype value)
inlinevirtual

Set the value stored in the node to "value".

Implements listnode< valuetype >.