#ifndef hashtableH
#define hashtableH

#define HASHSIZE 1000

template<class T>
class hashtable
{
private:
	vector< list< pair<string, T > > > data;
	unsigned int size;				// vector size
	unsigned int entries;			// # of table entries

	unsigned int string2num(const string &key) const;

public:
	hashtable();
	hashtable( const unsigned int _size );
	~hashtable(void);

	void clear(void);
	void insert(const string &key, T item);		// inserts an item. No duplicate entries are assumed!
	pair<bool, T> find(const string &key) const;
	bool erase(const string &key);				// erases an item. Returns true if found
};

#endif
