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

Inherits listnode< valuetype >.

Public Member Functions

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

Detailed Description

template<class valuetype>
class singlylinkedlistnode< valuetype >

The singlylinkedlistnode class stores the values that compose a singlylinkedlist.

Constructor & Destructor Documentation

◆ singlylinkedlistnode()

template<class valuetype >
singlylinkedlistnode< valuetype >::singlylinkedlistnode ( valuetype  value)
inline

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

◆ ~singlylinkedlistnode()

template<class valuetype >
singlylinkedlistnode< valuetype >::~singlylinkedlistnode
inline

Deletes this instance of the singlylinkedlistnode class.

Member Function Documentation

◆ getNext()

template<class valuetype >
listnode< valuetype > * singlylinkedlistnode< valuetype >::getNext
inlinevirtual

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

Implements listnode< valuetype >.

◆ getPrevious()

template<class valuetype >
listnode< valuetype > * singlylinkedlistnode< valuetype >::getPrevious
inlinevirtual

Always returns NULL.

Implements listnode< valuetype >.

◆ getReference()

template<class valuetype >
valuetype & singlylinkedlistnode< valuetype >::getReference
inlinevirtual

Returns a reference to the value stored in the node.

Implements listnode< valuetype >.

◆ getValue()

template<class valuetype >
valuetype singlylinkedlistnode< valuetype >::getValue
inlinevirtual

Returns the value stored in the node.

Implements listnode< valuetype >.

◆ setValue()

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

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

Implements listnode< valuetype >.