-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperationQueue.h
More file actions
41 lines (37 loc) · 757 Bytes
/
Copy pathOperationQueue.h
File metadata and controls
41 lines (37 loc) · 757 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
#ifndef OPR_QUE_H
#define OPR_QUE_H
#include <string>
#include <sstream>
#include <queue>
#include <vector>
#include <fstream>
using namespace std;
class Operation
{
private:
string name;
vector<string> parameters;
string exp;
string scanUntil(string s, char sign, unsigned int &pos);
public:
Operation(){ }
Operation(string operationText);
void parse(string operationText);
int parameterCount();
string getParameter(int i);
string getName();
string getExpression();
bool isExpression();
string toString();
friend ostream& operator << (ostream &out, Operation &op);
};
class OperationQueue
{
private:
queue<Operation> operQueue;
public:
OperationQueue(string filename);
bool isEmpty();
Operation pop();
};
#endif