00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __SYMTAB_H__
00012 #define __SYMTAB_H__
00013
00014 #ifndef CLONE_IDENTIFIERS
00015 #define FASTDB_CLONE_ANY_IDENTIFIER false
00016 #else
00017 #define FASTDB_CLONE_ANY_IDENTIFIER true
00018 #endif
00019
00020 class FASTDB_DLL_ENTRY dbSymbolTable {
00021 struct HashTableItem {
00022 HashTableItem* next;
00023 char* str;
00024 unsigned hash;
00025 int tag;
00026 byte allocated;
00027
00028 ~HashTableItem() {
00029 if (allocated) {
00030 delete[] str;
00031 }
00032 }
00033 };
00034 static HashTableItem* hashTable[];
00035
00036 public:
00037 ~dbSymbolTable();
00038 static dbSymbolTable instance;
00039
00040 static int add(char* &str, int tag, bool allocate = true);
00041 };
00042
00043 #endif
00044