-
Notifications
You must be signed in to change notification settings - Fork 2
/
Interpreter.h
46 lines (37 loc) · 1.05 KB
/
Interpreter.h
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
/*
* Interpreter.h
*
* Created on: Aug 28, 2014
* Author: wilhelma
*/
#ifndef INTERPRETER_H_
#define INTERPRETER_H_
/******************************************************************************
* Constants and Types
*****************************************************************************/
typedef enum {
IN_OK = 0, // Okay.
IN_NO_ENTRY = 1, // No entry found.
IN_ENTRY_EXISTS = 2, // Entry already exists.
IN_ABORT = 3 // Operation aborted.
} OkCode;
class EventService;
class LockMgr;
class ThreadMgr;
/******************************************************************************
* Interpreter (abstract)
*****************************************************************************/
class Interpreter {
public:
Interpreter(LockMgr* lockMgr, ThreadMgr* threadMgr, const char* logFile);
virtual int process() = 0;
void initLogger();
virtual ~Interpreter() {};
virtual EventService* getEventService() = 0;
protected:
LockMgr* lockMgr_;
ThreadMgr* threadMgr_;
private:
const char* logFile_;
};
#endif /* INTERPRETER_H_ */