/*
 * Instituto Superior de Engenharia do Porto
 *
 * Estruturas de Informação
 *
 * 2000/2001
 *
 * ------------------------------------------
 *
 * Classe de Tabela de Hashing fechado para strings
 *
 * hash_ab_str.h
 *
 */

#include <string>
#include <vector>
#include <list>
using namespace std;


const int DIM_NORMAL = 30;


class HashTableStrings 
{
private:

	typedef list<string> ListString;

	vector<ListString> m_tabela;

	void copia( const HashTableStrings& o );

public:
	HashTableStrings( int nSize = DIM_NORMAL );
	HashTableStrings( const HashTableStrings& o );

	bool insere(   const string& sTexto );
	bool pesquisa( const string& sTexto );
	bool elimina(  const string& sTexto );

	HashTableStrings& operator=( const HashTableStrings& o );
};


int HashingStrings( string sTexto, int nDiv = -1 );

