EPANET
3.0
EPANET Development Project
Main Page
Classes
Files
File List
File Members
src
Utilities
hashtable.h
Go to the documentation of this file.
1
/* EPANET 3
2
*
3
* Copyright (c) 2016 Open Water Analytics
4
* Licensed under the terms of the MIT License (see the LICENSE file for details).
5
*
6
*/
7
10
11
#ifndef HASHTABLE_H_
12
#define HASHTABLE_H_
13
14
#include <string>
15
16
class
Element
;
17
struct
HashTableItem
;
18
typedef
HashTableItem
*
HTitem
;
19
23
24
class
HashTable
25
{
26
public
:
27
28
HashTable
();
29
~
HashTable
();
30
31
int
insert(std::string* key,
Element
* value);
32
Element
* find(
const
std::string& key);
33
size_t
getCount();
34
35
private
:
36
37
HTitem
* ht;
// array of table entry pointers
38
size_t
count;
// number of entries in the hash table.
39
unsigned
int
hash(
const
std::string& str);};
40
41
#endif
Element
Abstract parent class for all pipe network components.
Definition:
element.h:19
HashTable
A hash table for element ID names and their objects.
Definition:
hashtable.h:24
HashTableItem
Definition:
hashtable.cpp:18
Generated by
1.8.11