|
CCAFFEINE
0.8.8
|
#include <StringHash.h>


Public Member Functions | |
| int | size () |
| boolean | isEmpty () |
| StringEnumeration * | keys () |
| keys will be enumerated as (char *) | |
| Enumeration * | elements () |
| boolean | contains (Object *value) |
| boolean | containsKey (char *key) |
| CFREE char ** | charKeysToArray (int &ka_length) |
| Object * | get (const char *key) |
| Object * | get (const std::string key) |
| CONST char * | getKey (char *key) |
| Object * | put (const char *key, Object *value) |
| Object * | put (const std::string key, Object *value) |
| Object * | remove (const char *key) |
| void | clear () |
| Object * | clone () |
| CFREE char * | toString () |
| boolean | containsValue (Object *o) |
| void | rehash (int &RehashError) |
Private Member Functions | |
| int | calculateBucket (register const char *str) |
Private Attributes | |
| StringHashBucket ** | table |
| int | table_length |
| int | N |
| float | loadFactor |
| int | numberOfKeys |
| int | rehashLimit |
| char ** | okeys |
| Object ** | oelements |
how to write a lousy hash class, by Ben Allan, 7/99. Note this used to have string template class dependencies that have been removed.
keys will be enumerated as (char *)
| CFREE char** jcpp::StringHash::charKeysToArray | ( | int & | ka_length | ) |
Create array of keys used in table. The array returned should be freed, but the keys in it should not. The keys will expire if the hashtable is destroyed.
| Object* jcpp::StringHash::get | ( | const char * | key | ) |
| Object* jcpp::StringHash::get | ( | const std::string | key | ) |
| CONST char* jcpp::StringHash::getKey | ( | char * | key | ) |
Return the string key pointer matching the query. The returned key will persist until that key/object pair is removed from the table.
| Object* jcpp::StringHash::put | ( | const char * | key, |
| Object * | value | ||
| ) |
Returns value argument or, if there already was an Object in the table under that key, returns the Object* it replaces.
| Object* jcpp::StringHash::put | ( | const std::string | key, |
| Object * | value | ||
| ) |
Returns value argument or, if there already was an Object in the table under that key, returns the Object* it replaces.
1.7.6.1