feisty meow concerns codebase  2.140
string_hash.h
Go to the documentation of this file.
1 #ifndef STRING_HASH_CLASS
2 #define STRING_HASH_CLASS
3 
4 /*****************************************************************************\
5 * *
6 * Name : string_hash *
7 * Author : Chris Koeritz *
8 * *
9 *******************************************************************************
10 * Copyright (c) 2001-$now By Author. This program is free software; you can *
11 * redistribute it and/or modify it under the terms of the GNU General Public *
12 * License as published by the Free Software Foundation; either version 2 of *
13 * the License or (at your option) any later version. This is online at: *
14 * http://www.fsf.org/copyleft/gpl.html *
15 * Please send any updates to: fred@gruntose.com *
16 \*****************************************************************************/
17 
18 #include "hash_table.h"
19 #include "string_hasher.h"
20 
21 #include <basis/astring.h>
22 
23 namespace structures {
24 
26 
27 template <class contents>
28 class string_hash : public hash_table<basis::astring, contents>
29 {
30 public:
32  : hash_table<basis::astring, contents>(astring_hasher(), estimated_elements) {}
33 
35 };
36 
37 } //namespace.
38 
39 #endif // outer guard.
40 
Implements hashing into buckets for quick object access.
Definition: hash_table.h:70
int estimated_elements() const
returns the size of table we're optimized for.
Definition: hash_table.h:101
Implements a hash table indexed on character strings.
Definition: string_hash.h:29
string_hash(int estimated_elements)
Definition: string_hash.h:31
The guards collection helps in testing preconditions and reporting errors.
Definition: array.h:30
A dynamic container class that holds any kind of object via pointers.
Definition: amorph.h:55