-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInterpreter.h
More file actions
50 lines (41 loc) · 818 Bytes
/
Interpreter.h
File metadata and controls
50 lines (41 loc) · 818 Bytes
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
48
49
50
/**
* @file
* @brief the header file of Interpreter
* @author elf@ZJU
* @version 1.0
*
* contains a test class
*/
#ifndef _Interpreter_H
#define _Interpreter_H
#include "miniSQL.h"
/**
* @class MyClass
* @brief a test class
*/
class MyClass {
public:
int k; ///< first public member
/** @brief a test function */
int fun();
private:
int j; ///< first private member
};
/**
* the command type enum
*/
enum CmdType{
CreateTableType,
CreateIndexType,
ExecFileType,
QuitType
};
/** @brief get a SQL from in and handle it */
void HandleOneSQL(istream &in);
/** @brief check the left quotation mark */
bool CheckLeftQuote(string &str);
/** @brief get the command type */
CmdType GetCmdType(string &sql);
/** @brief execute SQLs from a file */
void ExecFile(string &fileName);
#endif // _Interpreter_H