8 #include "CubeInfixToPostfix.h"
9 #include "IException.h"
19 CubeInfixToPostfix::CubeInfixToPostfix() {
30 void CubeInfixToPostfix::initialize() {
64 bool CubeInfixToPostfix::isKnownSymbol(QString representation) {
65 for(
int i = 0; i < p_operators.size(); i++) {
66 if(representation.compare(p_operators[i]->inputString()) == 0) {
71 bool isFunction = (representation.size() > 1);
72 if(representation[0] ==
'f') {
73 for(
int i = 1; isFunction && i < representation.size(); i++) {
74 isFunction &= (representation[i] >=
'0' && representation[i] <=
'9');
84 InfixOperator *CubeInfixToPostfix::findOperator(QString representation) {
86 return InfixToPostfix::findOperator(representation);
91 bool isFunction = (representation.size() > 1);
92 if(representation[0] ==
'f') {
93 for(
int i = 1; i < representation.size(); i++) {
94 isFunction &= (representation[i] >=
'0' && representation[i] <=
'9');
103 return p_operators[p_operators.size()-1];
107 "The operator '" + representation +
"' is not recognized.",