Main Page   Class Hierarchy   Compound List   File List   Compound Members  

symtab.h

00001 //-< SYMTAB.H >----------------------------------------------------*--------*
00002 // GigaBASE                  Version 1.0         (c) 1999  GARRET    *     ?  *
00003 // (Post Relational 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_GIGABASE_NAMESPACE
00015 
00016 #ifndef CLONE_IDENTIFIERS
00017 #define GB_CLONE_ANY_IDENTIFIER false
00018 #else
00019 #define GB_CLONE_ANY_IDENTIFIER true
00020 #endif
00021 
00022 class GIGABASE_DLL_ENTRY dbSymbolTable {
00023     struct HashTableItem {
00024         HashTableItem* next;
00025         char_t*        str;
00026         unsigned       hash;
00027         byte           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_t* &str, int tag, bool allocate = true);
00043 
00044     static void cleanup();
00045 };
00046 
00047 END_GIGABASE_NAMESPACE
00048 
00049 #endif
00050 

Generated on Mon Oct 23 13:22:59 2006 for GigaBASE by doxygen1.2.18