#include <dime/util/Dict.h>
Public Methods | |
| dimeDict (const int entries=17989) | |
| ~dimeDict () | |
| void | clear () |
| bool | enter (const char *const key, char *&ptr, void *value) |
| const char * | enter (const char *const key, void *value) |
| const char * | find (const char *const key) const |
| bool | find (const char *const key, void *&value) const |
| bool | remove (const char *const key) |
| void | dump (void) |
| void | print_info () |
It offers quick (hashing) lookup for strings.
|
|
Constructor. Creates entries buckets. |
|
|
Destructor. |
|
|
Clear all entries in the dictionary. |
|
||||||||||||
|
Insert a new string key in the dictionary, and associates a id (= value) to it. Returns a pointer to the string. If the string is already in the dictionary, the old id is replaced with value; |
|
||||||||||||||||
|
Inserts a new string key in the dictionary. This function returns true if the string was not already in the dictionary, false otherwise. The string pointer is returned in ptr. |
|
||||||||||||
|
Finds if key is in the dictionary. Returns true if found. |
|
|
Finds if key is in the dictionary. Returns the string pointer if found, NULL otherwise. |
|
|
Remove key from the dictionary. |