In file ../include/EST_THash.h:
A specialised hash table for when the key is an EST_String.
Inheritance:
Public Methods
| EST_TStringHash (int size)
Create a string hash table of <parameter>size</parameter> buckets
|
Public Classes
-
Pair Iteration
-
struct IPointer_s
- A position in the table is given by a bucket number and a pointer into the bucket
-
void skip_blank(IPointer &ip) const
- Shift to point at something
-
void point_to_first(IPointer &ip) const
- Go to start of the table
-
void move_pointer_forwards(IPointer &ip) const
- Move pointer forwards, at the end of the bucket, move down
-
bool points_to_something(const IPointer &ip) const
- We are at the end if the pointer ever becomes NULL
-
EST_Hash_Pair<K, V> & points_at(const IPointer &ip)
- Return the contents of this entry
-
typedef EST_Hash_Pair<K, V> Entry
- An entry returned by the iterator is a key value pair
-
typedef EST_TStructIterator< EST_THash<K, V>, IPointer, EST_Hash_Pair<K, V> > Entries
- Give the iterator a sensible name
-
Key Iteration
-
struct IPointer_k_s
- A position in the table is given by a bucket number and a pointer into the bucket
-
void skip_blank(IPointer_k &ip) const
- Shift to point at something
-
void point_to_first(IPointer_k &ip) const
- Go to start of the table
-
void move_pointer_forwards(IPointer_k &ip) const
- Move pointer forwards, at the end of the bucket, move down
-
bool points_to_something(const IPointer_k &ip) const
- We are at the end if the pointer ever becomes NULL
-
K& points_at(const IPointer_k &ip)
- Return the key of this entry
-
typedef K KeyEntry
- An entry returned by this iterator is just a key
-
typedef EST_TIterator< EST_THash<K, V>, IPointer_k, K > KeyEntries
- Give the iterator a sensible name
Public Methods
-
void clear(void)
-
unsigned int num_entries(void) const
-
int present(const K &key) const
-
V& val(const K &key, int &found) const
-
V& val(const K &key) const
-
void copy(const EST_THash<K, V> &from)
-
void map(void (*func)(K&, V&))
-
int add_item(const K &key, const V &value, int no_search = 0)
-
int remove_item(const K &rkey, int quiet = 0)
-
EST_THash<K,V> & operator = (const EST_THash<K, V> &from)
-
void dump(ostream &stream, int all=0)
Public Methods
-
static unsigned int DefaultHash(const void* data, size_t size, unsigned int n)
-
static unsigned int StringHash(const EST_String &key, unsigned int size)
Documentation
A specialised hash table for when the key is an EST_String.
This is just a version of <classname>EST_THash</classname> which
has a different default hash function.
EST_TStringHash(int size)
- Create a string hash table of <parameter>size</parameter> buckets
typedef EST_Hash_Pair<EST_String, V> Entry
- An entry returned by the iterator is a key value pair
typedef EST_TStructIterator< EST_THash<EST_String, V>, IPointer, EST_Hash_Pair<EST_String, V> > Entries
- Give the iterator a sensible name
- This class has no child classes.
Alphabetic index HTML hierarchy of classes or Java
This page is part of the
Edinburgh Speech Tools Library documentation
Copyright University of Edinburgh 1997
Contact:
speech_tools@cstr.ed.ac.uk