-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProcessTrace.h
49 lines (40 loc) · 1.36 KB
/
ProcessTrace.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
47
48
49
/*
* File: ProcessTrace.h
* Author: Tristan Gay
*
* Created on January 19, 2018, 9:09 PM
*/
#ifndef PROCESSTRACE_H
#define PROCESSTRACE_H
#include <string>
#include <fstream>
#include <vector>
#include <iostream> //cout, cerr
using namespace std;
class ProcessTrace {
public:
ProcessTrace(const std::string &file_name);
~ProcessTrace();
// Rule of Five methods -- they should not be used.
ProcessTrace(const ProcessTrace &orig) = delete;
ProcessTrace(ProcessTrace &&orig) = delete;
ProcessTrace operator=(const ProcessTrace &orig) = delete;
ProcessTrace operator=(ProcessTrace &&orig) = delete;
/**
* Execute - executes commands specified in our file.
* @param command takes a string to be parsed.
*/
void Execute(string command);
/**
* printVector - prints a range of the contents of our vector
* @param v input vector
* @param begin beginning index we want to print from
* @param count how many elements we want to print
*/
void printVector(vector<uint8_t> v, unsigned int begin, unsigned int count);
private:
vector<uint8_t> memory; //acts as fake memory
size_t memorySize; //the size of our memory vector -- specified by the ALLOC command
ifstream inputFileStream; //input file stream
};
#endif /* PROCESSTRACE_H */