diff options
Diffstat (limited to 'src/evaluator.h')
-rw-r--r-- | src/evaluator.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/evaluator.h b/src/evaluator.h index 081ac14..2377f27 100644 --- a/src/evaluator.h +++ b/src/evaluator.h @@ -22,8 +22,8 @@ #ifndef ABAKUS_EVALUATOR_H #define ABAKUS_EVALUATOR_H -#include <qstring.h> -#include <qvaluevector.h> +#include <tqstring.h> +#include <tqvaluevector.h> #include "numerictypes.h" @@ -53,13 +53,13 @@ public: Equal // variable assignment } Op; - Token( Type type = Unknown, const QString& text = QString::null, int pos = -1 ); + Token( Type type = Unknown, const TQString& text = TQString(), int pos = -1 ); Token( const Token& ); Token& operator=( const Token& ); Type type() const { return m_type; } - QString text() const { return m_text; } + TQString text() const { return m_text; } int pos() const { return m_pos; }; bool isNumber() const { return m_type == Number; } @@ -69,21 +69,21 @@ public: Abakus::number_t asNumber() const; Op asOperator() const; - QString description() const; + TQString description() const; static const Token null; protected: Type m_type; - QString m_text; + TQString m_text; int m_pos; }; -class Tokens: public QValueVector<Token> +class Tokens: public TQValueVector<Token> { public: - Tokens(): QValueVector<Token>(), m_valid(true) {}; + Tokens(): TQValueVector<Token>(), m_valid(true) {}; bool valid() const { return m_valid; } void setValid( bool v ) { m_valid = v; } @@ -95,7 +95,7 @@ protected: class Variable { public: - QString name; + TQString name; Abakus::number_t value; }; @@ -105,20 +105,20 @@ public: Evaluator(); ~Evaluator(); - void setExpression( const QString& expr ); - QString expression() const; + void setExpression( const TQString& expr ); + TQString expression() const; void clear(); bool isValid() const; Tokens tokens() const; - static Tokens scan( const QString& expr ); + static Tokens scan( const TQString& expr ); - QString error() const; + TQString error() const; // Abakus::number_t eval(); - static QString autoFix( const QString& expr ); + static TQString autoFix( const TQString& expr ); private: Evaluator( const Evaluator& ); |