dbcontrol.h
来自「数据库模拟程序 实现控制台命令词法分析」· C头文件 代码 · 共 66 行
H
66 行
// DBControl.h: interface for the CDBControl class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_DBCONTROL_H__D909373F_C69E_4F35_92F9_58F0ADEF999F__INCLUDED_)
#define AFX_DBCONTROL_H__D909373F_C69E_4F35_92F9_58F0ADEF999F__INCLUDED_
#include "StdAfx.h" // Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "RunTimer.h"
#include "User.h"
class CDBControl
{
public:
int ConvertWordToRightId(Word wordItem);
int Revoke(CString str, Word word[], int len);
int Grant(CString str, Word word[], int len);
bool CheckRight(int cmdId);
int Select_Index(CString str, Word word[], int len);
int noIndex;
int AddRecordIndex(char tableName[],long &startOffset, char dataName[]);
int ReadTable(char filename[], long indexID, Data &data);
int show(CString str, Word word[], int len);
int Delete(CString str, Word word[], int len);
int Alter(CString str, Word word[], int len);
int getIndexFromCiDian(IndexForCiDian &index, Data &data, char name[]);
int UpdateTable(CString strCmd, Word word[], int len);
int RewriteCiDian();
int RewriteIndexFile();
int CDBControl::ReadFromCiDian(long indexID, Data &data);
int ReadFromCiDian(const IndexForCiDian &index, Data &data);
int InsertIntoValue(CString strCmd, Word word[], int len);
int Select_noIndex(CString str, Word word[], int len);
long findInIndexFile(IndexForCiDian &findIndex);
int Drop(CString CmdLine, Word word[], int LenOfWord);
void ReadFromIndex();
int CDBControl::ReadFromIndex(long indexID, IndexForCiDian &index);
class CUser currentUser;
int len;
Word* word;
CDBControl(CString str, Word *word, int LenOfWord);
void CheckCMD(int cmdType);
int indexArray_len;
int dataArray_len;
int initTable();
Data data;
IndexForCiDian *indexArray;
int AddToDataCiDian(const Data &dataFile, long &start);
int AddToIndex_ForCiDian(const IndexForCiDian &index);
int isExistTheKey(CString str);
CString m_strCmd;
int CreateTable(CString CmdLine, Word word[], int LenOfWord);
CDBControl();
virtual ~CDBControl();
};
#endif // !defined(AFX_DBCONTROL_H__D909373F_C69E_4F35_92F9_58F0ADEF999F__INCLUDED_)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?