~ubuntu-branches/ubuntu/jaunty/speech-tools/jaunty

« back to all changes in this revision

Viewing changes to include/EST_THash.h

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Urlichs
  • Date: 2004-07-16 09:25:39 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040716092539-5p1tzif55b8j924e
Tags: 1:1.2.3-8
Added alaw processing code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#ifndef __EST_THASH_H__
37
37
#define __EST_THASH_H__
38
38
 
39
 
#include <iostream.h>
 
39
#include <iostream>
40
40
#include "EST_String.h"
41
41
#include "EST_system.h"
42
42
#include "EST_bool.h"
43
43
#include "EST_TIterator.h"
44
44
 
 
45
using namespace std;
 
46
 
45
47
#include "instantiate/EST_THashI.h"
46
48
#include "instantiate/EST_TStringHashI.h"
47
49
 
48
50
/**@name Hash Tables
49
51
  *
50
52
  * @author Richard Caley <rjc@cstr.ed.ac.uk>
51
 
  * @version $Id: EST_THash.h,v 1.2 2001/04/04 13:11:27 awb Exp $
 
53
  * @version $Id: EST_THash.h,v 1.3 2002/12/26 15:48:53 awb Exp $
52
54
  */
53
55
//@{
54
56
 
277
279
template<class V>
278
280
class EST_TStringHash : public EST_THash<EST_String, V> {
279
281
public:
 
282
 
280
283
  /// Create a string hash table of <parameter>size</parameter> buckets.
281
284
  EST_TStringHash(int size) : EST_THash<EST_String, V>(size, StringHash) {};
282
285
 
283
286
  /// An entry returned by the iterator is a key value pair.
284
287
  typedef EST_Hash_Pair<EST_String, V> Entry;
285
288
 
 
289
/*    struct IPointer_s{  unsigned int b; Entry *p; };
 
290
      typedef struct IPointer_s IPointer; */
 
291
 
 
292
 
286
293
  /// Give the iterator a sensible name.
287
 
  typedef EST_TStructIterator< EST_THash<EST_String, V>, IPointer, EST_Hash_Pair<EST_String, V> > Entries;
 
294
  typedef EST_TStructIterator< EST_THash<EST_String, V>, typename EST_TStringHash<V>::IPointer, EST_Hash_Pair<EST_String, V> > Entries;
288
295
 
289
 
  typedef EST_TRwStructIterator< EST_THash<EST_String, V>, IPointer, EST_Hash_Pair<EST_String, V> > RwEntries;
 
296
  typedef EST_TRwStructIterator< EST_THash<EST_String, V>, typename EST_TStringHash<V>::IPointer, EST_Hash_Pair<EST_String, V> > RwEntries;
290
297
  //@}
291
298
 
292
299
  typedef EST_String KeyEntry;
293
300
 
 
301
/*  struct IPointer_k_s {  unsigned int b; EST_Hash_Pair<EST_String, V> *p; };
 
302
    typedef struct IPointer_k_s IPointer_k; */
 
303
 
294
304
  /// Give the iterator a sensible name.
295
 
  typedef EST_TIterator< EST_THash<EST_String, V>, IPointer_k, EST_String > KeyEntries;
296
 
  typedef EST_TRwIterator< EST_THash<EST_String, V>, IPointer_k, EST_String > KeyRwEntries;
 
305
  typedef EST_TIterator< EST_THash<EST_String, V>, typename EST_TStringHash<V>::IPointer_k, EST_String > KeyEntries;
 
306
  typedef EST_TRwIterator< EST_THash<EST_String, V>, typename EST_TStringHash<V>::IPointer_k, EST_String > KeyRwEntries;
297
307
};
298
308
 
299
309