Rudiments
|
Public Member Functions | |
singlylinkedlistnode (valuetype value) | |
~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 |
The singlylinkedlistnode class stores the values that compose a singlylinkedlist.
singlylinkedlistnode< valuetype >::singlylinkedlistnode | ( | valuetype | value | ) |
Creates an instance of the singlylinkedlistnode class that stores value "value".
singlylinkedlistnode< valuetype >::~singlylinkedlistnode | ( | ) |
Deletes this instance of the singlylinkedlistnode class. Note however, that the value stored in the singlylinkedlistnode is not deleted by this call.
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".
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".
singlylinkedlistnode<valuetype>* singlylinkedlistnode< valuetype >::getNext | ( | ) |
Returns the next node in the singlylinkedlist or NULL if this node is the last node in the list.
valuetype singlylinkedlistnode< valuetype >::getValue | ( | ) | const |
Return the value stored in the node.
void singlylinkedlistnode< valuetype >::print | ( | ) | const |
Prints the value stored in the node.
void singlylinkedlistnode< valuetype >::setValue | ( | valuetype | value | ) |
Set the value stored in the node to "value".