Loading...
Searching...
No Matches
EST_TStringHash< V > Class Template Reference

`#include <include/EST_THash.h>`

Inheritance diagram for EST_TStringHash< V >:
[legend]
Collaboration diagram for EST_TStringHash< V >:
[legend]

## Public Types

typedef EST_Hash_Pair< EST_String, V > | Entry
| An entry returned by the iterator is a key value pair.
typedef EST_THash< EST_String, V >::IPointer | TN_IPointer
typedef EST_TStructIterator< EST_THash< EST_String, V >, typename EST_THash< EST_String, V >::IPointer, EST_Hash_Pair< EST_String, V > > | Entries
| Give the iterator a sensible name.
typedef EST_TRwStructIterator< EST_THash< EST_String, V >, typename EST_THash< EST_String, V >::IPointer, EST_Hash_Pair< EST_String, V > > | RwEntries
typedef EST_String | KeyEntry
typedef EST_THash< EST_String, V >::IPointer_k | TN_IPointer_k
| Give the iterator a sensible name.
typedef EST_TIterator< EST_THash< EST_String, V >, typename EST_THash< EST_String, V >::IPointer_k, EST_String > | KeyEntries
typedef EST_TRwIterator< EST_THash< EST_String, V >, typename EST_THash< EST_String, V >::IPointer_k, EST_String > | KeyRwEntries
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.
typedef EST_TRwStructIterator< EST_THash< EST_String, V >, IPointer, EST_Hash_Pair< EST_String, V > > | RwEntries
typedef EST_String | KeyEntry
| An entry returned by this iterator is just a key.
typedef EST_TIterator< EST_THash< EST_String, V >, IPointer_k, EST_String > | KeyEntries
| Give the iterator a sensible name.
typedef EST_TRwIterator< EST_THash< EST_String, V >, IPointer_k, EST_String > | KeyRwEntries

## Public Member Functions

| EST_TStringHash (int size)
| Create a string hash table of <parameter>size</parameter> buckets.
Public Member Functions inherited from EST_THash< EST_String, V >
| EST_THash (int size, unsigned int(*hash_function)(const EST_String &key, unsigned int size)=NULL)
| ~EST_THash (void)
| Destroy the table.
void | clear (void)
| Empty the table.
unsigned int | num_entries (void) const
| Return the total number of entries in the table.
int | present (const EST_String &key) const
| Does the key have an entry?
V & | val (const EST_String &key, int &found) const
const EST_String & | key (const V &val, int &found) const
void | copy (const EST_THash< EST_String, V > &from)
| Copy all entries.
void | map (void(*func)(EST_String &, V &))
| Apply <parameter>func</parameter> to each entry in the table.
int | add_item (const EST_String &key, const V &value, int no_search=0)
| Add an entry to the table.
int | remove_item (const EST_String &rkey, int quiet=0)
| Remove an entry from the table.
EST_THash< EST_String, V > & | operator= (const EST_THash< EST_String, V > &from)
| Assignment is a copy operation.
void | dump (ostream &stream, int all=0)
| Print the table to <parameter>stream</parameter> in a human readable format.

## Additional Inherited Members

typedef struct IPointer_s | IPointer
typedef struct IPointer_k_s | IPointer_k
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< EST_String, V > & | points_at (const IPointer &ip)
| Return the contents of this entry.
Static Protected Member Functions inherited from EST_HashFunctions
static unsigned int | DefaultHash (const void *data, size_t size, unsigned int n)
| A generally useful hash function.
static unsigned int | StringHash (const EST_String &key, unsigned int size)
| A hash function for strings.

## Detailed Description

template<class V>
class EST_TStringHash< V >

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.

Definition at line 281 of file EST_THash.h.

## Member Typedef Documentation

## Entry

template<class V>

typedef EST_Hash_Pair<EST_String, V> EST_TStringHash< V >::Entry

An entry returned by the iterator is a key value pair.

Definition at line 288 of file EST_THash.h.

## TN_IPointer

template<class V>

typedef EST_THash<EST_String,V>::IPointer EST_TStringHash< V >::TN_IPointer

Definition at line 294 of file EST_THash.h.

## Entries

template<class V>

typedef EST_TStructIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer, EST_Hash_Pair<EST_String, V> > EST_TStringHash< V >::Entries

Give the iterator a sensible name.

Definition at line 298 of file EST_THash.h.

## RwEntries

template<class V>

typedef EST_TRwStructIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer, EST_Hash_Pair<EST_String, V> > EST_TStringHash< V >::RwEntries

Definition at line 301 of file EST_THash.h.

## KeyEntry

template<class V>

typedef EST_String EST_TStringHash< V >::KeyEntry

Definition at line 304 of file EST_THash.h.

## TN_IPointer_k

template<class V>

typedef EST_THash<EST_String,V>::IPointer_k EST_TStringHash< V >::TN_IPointer_k

Give the iterator a sensible name.

Definition at line 312 of file EST_THash.h.

## KeyEntries

template<class V>

typedef EST_TIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer_k, EST_String > EST_TStringHash< V >::KeyEntries

Definition at line 315 of file EST_THash.h.

## KeyRwEntries

template<class V>

typedef EST_TRwIterator< EST_THash<EST_String, V>, typename EST_THash<EST_String, V>::IPointer_k, EST_String > EST_TStringHash< V >::KeyRwEntries

Definition at line 317 of file EST_THash.h.

## Constructor & Destructor Documentation

## EST_TStringHash()

template<class V>

EST_TStringHash< V >::EST_TStringHash | ( | int | size | ) |

inline

Create a string hash table of <parameter>size</parameter> buckets.

Definition at line 285 of file EST_THash.h.

The documentation for this class was generated from the following file:

- include/EST_THash.h