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