Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Курсовой проект2 / CompareMethods_CBuilder6 / Main
.h//---------------------------------------------------------------------------
#ifndef MainH
#define MainH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
class TfrmMain : public TForm
{
__published: // IDE-managed Components
TPanel *Panel1;
TPanel *Panel2;
TGroupBox *GroupBox1;
TGroupBox *GroupBox2;
TMemo *mText;
TPanel *Panel3;
TMemo *mResTree;
TMemo *mResReHash;
TGroupBox *GroupBox3;
TEdit *edCollision;
TLabel *Label2;
TStringGrid *sgHashTable;
TPanel *Panel5;
TPanel *Panel6;
TButton *Button2;
TEdit *edSearch;
TPanel *Panel4;
TMemo *mInputFile;
void __fastcall Button2Click(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
private: // User declarations
public: // User declarations
__fastcall TfrmMain(TComponent* Owner);
class Identificator;
void AddToTree(int,Identificator*);
int AddToHashTableChane(int,Identificator*,int *);
int SearchId(char *,Identificator*);
int *MakeHashTable(Identificator *IdentTable,int IdentTableLength, int HashTableLength);
int NextHash(Identificator *ident, int *hashTable, int HashTableLength);
void ShowTable(TStringGrid *sgGrid, int *hashTable, int HashTableLength);
int HashIdSearch(Identificator *IdentTable, int *hashTable, int HashTableLength, AnsiString);
int cmp_count_tree;
int cmp_count_rehash;
Identificator *TreeIdentTable;
Identificator *HashIdentTable;
int *HashTable;
int HashTableLen;
int collision_rehash;
};
//---------------------------------------------------------------------------
extern PACKAGE TfrmMain *frmMain;
//---------------------------------------------------------------------------
#endif