-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathworkShop.h
More file actions
39 lines (29 loc) · 808 Bytes
/
workShop.h
File metadata and controls
39 lines (29 loc) · 808 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
#ifndef _WORK_SHOP_H_
#define _WORK_SHOP_H_
#include "virtualMachine.h"
#include "lexer.h"
#include "parser.h"
class WorkShop
{
public:
WorkShop();
~WorkShop() = default;
WorkShop(const WorkShop&) = delete;
WorkShop& operator=(const WorkShop&) = delete;
WorkShop(WorkShop&&) = delete;
WorkShop& operator=(WorkShop&&) = delete;
static WorkShop& getInstance();
std::vector<std::string> getVMSrc();
size_t getPC() const;
void step();
void resetProgram();
const std::vector<int> &getVMRegisters() const;
const std::vector<int> &getVMMemory() const;
bool getVMZeroFlag() const;
bool getVMSignFlag() const;
std::vector<std::string> loadProgram(const std::string &source);
private:
private:
VirtualMachine vm_;
};
#endif // _WORK_SHOP_H_