|
Rudiments
|
Public Member Functions | |
| dictionarynode (keytype key, valuetype value) | |
| virtual | ~dictionarynode () |
| void | setKey (keytype key) |
| void | setValue (valuetype value) |
| keytype | getKey () const |
| valuetype | getValue () const |
| int32_t | compare (keytype testkey) const |
| int32_t | compare (dictionarynode< keytype, valuetype > *testnode) const |
| void | print () const |
The dictionarynode class stores the key/value pairs that compose a dictionary.
| dictionarynode< keytype, valuetype >::dictionarynode | ( | keytype | key, |
| valuetype | value | ||
| ) |
Creates an instance of the dictionary node class with key "key" and value "value".
|
virtual |
Deletes this instance of the dictionarynode class. Note however, that neither the key nor value stored in the dictionarynode are deleted by this call.
| int32_t dictionarynode< keytype, valuetype >::compare | ( | dictionarynode< keytype, valuetype > * | testnode | ) | 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".
| int32_t dictionarynode< keytype, valuetype >::compare | ( | keytype | testkey | ) | 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".
| keytype dictionarynode< keytype, valuetype >::getKey | ( | ) | const |
Returns the key stored in the node.
| valuetype dictionarynode< keytype, valuetype >::getValue | ( | ) | const |
Returns the value stored in the node.
| void dictionarynode< keytype, valuetype >::print | ( | ) | const |
Prints a representation of the key and value stored in the node.
| void dictionarynode< keytype, valuetype >::setKey | ( | keytype | key | ) |
Sets the key stored in the node to "key".
| void dictionarynode< keytype, valuetype >::setValue | ( | valuetype | value | ) |
Sets the value stored in the node to "value".