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

Inherits listnode< valuetype >.

Public Member Functions

 linkedlistnode (valuetype value)
 
 ~linkedlistnode ()
 
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 linkedlistnode< valuetype >

The linkedlistnode class stores the values that compose a linkedlist.

Constructor & Destructor Documentation

◆ linkedlistnode()

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

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

◆ ~linkedlistnode()

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

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 >.