Main Page   Class Hierarchy   Compound List   File List   Compound Members  

symtab.h

00001 //-< SYMTAB.H >----------------------------------------------------*--------*
00002 // FastDB                    Version 1.0         (c) 1999  GARRET    *     ?  *
00003 // (Main Memory Database Management System)                          *   /\|  *
00004 //                                                                   *  /  \  *
00005 //                          Created:     20-Nov-98    K.A. Knizhnik  * / [] \ *
00006 //                          Last update: 10-Dec-98    K.A. Knizhnik  * GARRET *
00007 //-------------------------------------------------------------------*--------*
00008 // Symbol table interface
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 

Generated on Mon Oct 23 13:23:58 2006 for FastDB by doxygen1.2.18