79 cout <<
"length of `fred' = " << lengths.
val(
"fred") <<
"\n";
80 cout <<
"log of 34' = " << logs.
val(34) <<
"\n";
86 cout <<
"now don't know log of 34' = " << logs.
val(34) <<
"\n";
94 float val = logs.
val(123, found);
101 cout <<
" not found";
111 lengths.
map(look_at);
118 for(them.
begin(const_lengths); them; them++)
120 cout << them->k <<
" " << them->v <<
" ";
127 for(rwthem.
begin(lengths); rwthem; rwthem++)
130 cout << rwthem->k <<
" " << rwthem->v <<
" ";
143 #if defined(INSTANTIATE_TEMPLATES) 144 #include "../base_class/EST_THash.cc"
#define Instantiate_THash(KEY, VAL)
void map(void(*func)(EST_String &, V &))
Apply func to each entry in the table.
A specialised hash table for when the key is an EST_String.
void begin(Container &over)
Set the iterator ready to run over this container.
int remove_item(const K &rkey, int quiet=0)
Remove an entry from the table.
V & val(const EST_String &key, int &found) const
int add_item(const EST_String &key, const V &value, int no_search=0)
Add an entry to the table.
void begin(const Container &over)
Set the iterator ready to run over this container.
An open hash table. The number of buckets should be set to allow enough space that there are relative...
void dump(ostream &stream, int all=0)
Print the table to stream in a human readable format.