-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotationConverter.hpp
More file actions
28 lines (21 loc) · 867 Bytes
/
NotationConverter.hpp
File metadata and controls
28 lines (21 loc) · 867 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
#ifndef NOTATIONCONVERTER_H
#define NOTATIONCONVERTER_H
#include "NotationConverterInterface.hpp"
#include "Deque.hpp"
#include<iostream>
//Class of the notation converter
class NotationConverter : public NotationConverterInterface{
public:
std::string postfixToInfix(std::string inStr);
std::string postfixToPrefix(std::string inStr);
std::string infixToPostfix(std::string inStr);
std::string infixToPrefix(std::string inStr);
std::string prefixToInfix(std::string inStr);
std::string prefixToPostfix(std::string inStr);
std::string toString();
private:
Deque deque; // Main deck that will be used to convert between the notations
Deque operands; // Temporary deque to store operands when converting between notations
Deque operators; // Temporary deque to store operators when converting between notations
};
#endif