Rudiments
|
Inherited by dictionarylistnode< char *, datatype >, dictionarylistnode< const char *, datatype >, and dictionarylistnode< int32_t, datatype >.
Public Member Functions | |
linkedlistnode () | |
virtual | ~linkedlistnode () |
void | setData (datatype data) |
datatype | getData () const |
int32_t | compare (datatype data) const |
void | setPrevious (linkedlistnode< datatype > *previous) |
void | setNext (linkedlistnode< datatype > *next) |
linkedlistnode< datatype > * | getPrevious () |
linkedlistnode< datatype > * | getNext () |
void | print () const |
The linkedlistnode class stores the values that compose a linkedlist.
linkedlistnode< datatype >::linkedlistnode | ( | ) |
Creates an empty instance of the linkedlistnode class.
virtual linkedlistnode< datatype >::~linkedlistnode | ( | ) | [virtual] |
Deletes this instance of the linkedlistnode class. Note however, that the data stored in the linkedlistnode is not deleted by this call.
int32_t linkedlistnode< datatype >::compare | ( | datatype | data | ) | const |
Returns a negative number,0 or a positive number depending on whether the key stored in the node is respectively less than, equal to or greater than "testkey".
datatype linkedlistnode< datatype >::getData | ( | ) | const |
Return the data stored in the node.
linkedlistnode<datatype>* linkedlistnode< datatype >::getNext | ( | ) |
Returns the next node in the linkedlist.
linkedlistnode<datatype>* linkedlistnode< datatype >::getPrevious | ( | ) |
Returns the previous node in the linkedlist.
void linkedlistnode< datatype >::print | ( | ) | const |
Prints the data stored in the node.
void linkedlistnode< datatype >::setData | ( | datatype | data | ) |
Set the data stored in the node to "data".
void linkedlistnode< datatype >::setNext | ( | linkedlistnode< datatype > * | next | ) |
Sets the pointer to the next node to "next".
void linkedlistnode< datatype >::setPrevious | ( | linkedlistnode< datatype > * | previous | ) |
Sets the pointer to the previous node to "previous".