Menu

[r119]: / inc / symtab.h  Maximize  Restore  History

Download this file

49 lines (38 with data), 1.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//-< SYMTAB.H >----------------------------------------------------*--------*
// FastDB Version 1.0 (c) 1999 GARRET * ? *
// (Main Memory Database Management System) * /\| *
// * / \ *
// Created: 20-Nov-98 K.A. Knizhnik * / [] \ *
// Last update: 10-Dec-98 K.A. Knizhnik * GARRET *
//-------------------------------------------------------------------*--------*
// Symbol table interface
//-------------------------------------------------------------------*--------*
#ifndef __SYMTAB_H__
#define __SYMTAB_H__
BEGIN_FASTDB_NAMESPACE
#if defined(CLONE_IDENTIFIERS) || defined(FASTDB_DLL)
#define FASTDB_CLONE_ANY_IDENTIFIER true
#else
#define FASTDB_CLONE_ANY_IDENTIFIER false
#endif
class FASTDB_DLL_ENTRY dbSymbolTable {
struct HashTableItem {
HashTableItem* next;
char* str;
unsigned hash;
int tag;
byte allocated;
~HashTableItem() {
if (allocated) {
delete[] str;
}
}
};
static HashTableItem* hashTable[];
public:
~dbSymbolTable();
static dbSymbolTable instance;
static int add(char* &str, int tag, bool allocate = true);
};
END_FASTDB_NAMESPACE
#endif