-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHashTable.h
More file actions
executable file
·42 lines (38 loc) · 927 Bytes
/
HashTable.h
File metadata and controls
executable file
·42 lines (38 loc) · 927 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/**********************************
* FILE NAME: HashTable.h
*
* DESCRIPTION: Header file HashTable class (Revised 2020)
**********************************/
#ifndef HASHTABLE_H_
#define HASHTABLE_H_
/**
* Header files
*/
#include "stdincludes.h"
#include "common.h"
#include "Entry.h"
/**
* CLASS NAME: HashTable
*
* DESCRIPTION: This class is a wrapper to the map provided by C++ STL.
*
*/
class HashTable {
public:
map<string, string> hashTable;
//public:
HashTable();
bool create(string key, string value);
string read(string key);
bool update(string key, string newValue);
bool deleteKey(string key);
bool isEmpty();
unsigned long currentSize();
void clear();
unsigned long count(string key);
vector<pair<string, string> > retPrimaryPairs();
vector<pair<string, string> > retSecondaryPairs();
vector<pair<string, string> > retTertiaryPairs();
virtual ~HashTable();
};
#endif /* HASHTABLE_H_ */