name: HashTable<class THashable, class TObject> : public DstrBase

synopsis:

g++ [flags ...] file ...

#include <HashTable.h>

HashTable(ALLOCATION alloc = SYSTEM, long initial_capacity =
          DEF_CAPACITY, float load_factor = DEF_LOAD_FACTOR));
TObject* get(const THashable& key);
const TObject* get(const THashable& key) const;
boolean insert(THashable& key, TObject* value);
boolean keys(Vector& keys_list) const;
boolean values(Vector<TObject>& items_list) const;
quick start:

// declare a character hash table and insert a character in it
//
HashTable<String,Char> table0;
Char item(L'a');
String key(L"test_key");
table0.insert(key, &item);

// get the item out
//
if(table0.get(key)->ne(item)) {

  // error
  //
}
description:

The HashTable class is an effective way of implementing dictionary lookups since it provides an extremely fast way of inserting, deleting, and searching for items. For a good reference on hash tables, see: This class uses a vector of single linked lists in SYSTEM mode to manage the HashTable.

dependencies:

public constants:

error codes:

protected data:

required public methods:

class-specific public methods:

private methods:

friend classes:

examples:

notes: