|
Isis Developer Reference
|
Go to the documentation of this file.
8 #ifndef INFIXTOPOSTFIX_H_
9 #define INFIXTOPOSTFIX_H_
51 QString
convert(
const QString &infix);
65 QString formatFunctionCalls(QString equation);
66 QString cleanSpaces(QString equation);
68 void closeParenthesis(QString &postfix, std::stack<InfixOperator> &theStack);
69 void addOperator(QString &postfix,
const InfixOperator &op, std::stack<InfixOperator> &theStack);
70 bool isFunction(QString representation);
71 void checkArgument(QString funcName,
int argNum, QString argument);
85 m_inputString = inString;
86 m_outputString = inString;
87 m_isFunction = isFunc;
91 bool isFunc =
false) {
93 m_inputString = inString;
94 m_outputString = outString;
95 m_isFunction = isFunc;
103 return m_outputString;
117 QString m_inputString;
118 QString m_outputString;
134 m_numArguments = argCount;
139 m_numArguments = argCount;
143 return m_numArguments;
virtual InfixOperator * findOperator(QString representation)
This method will return a pointer to the operator represented by 'representation.
Definition: InfixToPostfix.cpp:347
bool isFunction() const
Definition: InfixToPostfix.h:110
IString DownCase()
Converts all upper case letters in the object IString into lower case characters.
Definition: IString.cpp:644
InfixOperator and InfixFunction are helper classes for InfixToPostfix.
Definition: InfixToPostfix.h:130
This is free and unencumbered software released into the public domain.
Definition: BoxcarCachingAlgorithm.h:13
QString tokenizeEquation(const QString &equation)
This method will add spaces between all operators and numbers, making it possible to get each element...
Definition: InfixToPostfix.cpp:369
QString convert(const QString &infix)
This method converts infix to postfix.
Definition: InfixToPostfix.cpp:139
virtual ~InfixToPostfix()
Definition: InfixToPostfix.cpp:23
InfixToPostfix()
Constructor.
Definition: InfixToPostfix.cpp:19
InfixFunction(QString inString, QString outString, int argCount)
Definition: InfixToPostfix.h:137
int argumentCount() const
Definition: InfixToPostfix.h:142
int precedence() const
Definition: InfixToPostfix.h:106
QString toString(bool boolToConvert)
Global function to convert a boolean to a string.
Definition: IString.cpp:211
InfixOperator(int prec, QString inString, QString outString, bool isFunc=false)
Definition: InfixToPostfix.h:90
#define _FILEINFO_
Macro for the filename and line number.
Definition: IException.h:24
InfixOperator(int prec, QString inString, bool isFunc=false)
Definition: InfixToPostfix.h:83
QList< InfixOperator * > p_operators
Definition: InfixToPostfix.h:59
InfixOperator and InfixFunction are helper classes for InfixToPostfix.
Definition: InfixToPostfix.h:81
Converter for math equations.
Definition: InfixToPostfix.h:46
Isis exception class.
Definition: IException.h:91
double toDouble(const QString &string)
Global function to convert from a string to a double.
Definition: IString.cpp:149
Namespace for the standard library.
IString Token(const IString &separator)
Returns the first token in the IString.
Definition: IString.cpp:897
Adds specific functionality to C++ strings.
Definition: IString.h:165
InfixFunction(QString inString, int argCount)
Definition: InfixToPostfix.h:132
virtual bool isKnownSymbol(QString representation)
This method will return true if it believes the argument represents a valid function or operator.
Definition: InfixToPostfix.cpp:253
IString Remove(const std::string &del)
Remove all instances of any character in the string from the IString.
Definition: IString.cpp:1266
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16
QString ToQt() const
Retuns the object string as a QString.
Definition: IString.cpp:869
const QString & inputString() const
Definition: InfixToPostfix.h:98
const QString & outputString() const
Definition: InfixToPostfix.h:102