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