⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 symtab.h

📁 实现内存数据库的源代码
💻 H
字号:
//-< 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__

#ifndef CLONE_INDENTIFIERS
#define FASTDB_CLONE_ANY_IDENTIFIER false
#else
#define FASTDB_CLONE_ANY_IDENTIFIER true
#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);
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -