Rudiments

- Main Page
- Classes

- Class List
- Class Hierarchy
- Class Members

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

## Public Member Functions
| singlylinkedlistnode (valuetype value)
virtual | ~singlylinkedlistnode ()
void | setValue (valuetype value)
valuetype | getValue () const
int32_t | compare (valuetype value) const
int32_t | compare (singlylinkedlistnode< valuetype > *peer) const
singlylinkedlistnode< valuetype > * | getNext ()
void | print () const

## Detailed Description

### template<class valuetype>
class singlylinkedlistnode< valuetype >

The singlylinkedlistnode class stores the values that compose a singlylinkedlist.

## Constructor & Destructor Documentation

template<class valuetype>

singlylinkedlistnode< valuetype >::singlylinkedlistnode | ( | valuetype | value | ) |

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

template<class valuetype>

virtual singlylinkedlistnode< valuetype >::~singlylinkedlistnode | ( |  | ) |
| virtual

Deletes this instance of the singlylinkedlistnode class. Note however, that the value stored in the singlylinkedlistnode is not deleted by this call.

## Member Function Documentation

template<class valuetype>

int32_t singlylinkedlistnode< valuetype >::compare | ( | valuetype | value | ) | const

Returns a negative number, 0, or a positive number depending on whether the value stored in the node is respectively less than, equal to or greater than "value".

template<class valuetype>

int32_t singlylinkedlistnode< valuetype >::compare | ( | singlylinkedlistnode< valuetype > * | peer | ) | const

Returns a negative number, 0, or a positive number depending on whether the value stored in the node is respectively less than, equal to or greater than the value stored in "peer".

template<class valuetype>

singlylinkedlistnode<valuetype>* singlylinkedlistnode< valuetype >::getNext | ( |  | ) |

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

template<class valuetype>

valuetype singlylinkedlistnode< valuetype >::getValue | ( |  | ) | const

Return the value stored in the node.

template<class valuetype>

void singlylinkedlistnode< valuetype >::print | ( |  | ) | const

Prints the value stored in the node.

template<class valuetype>

void singlylinkedlistnode< valuetype >::setValue | ( | valuetype | value | ) |

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