#ifndef EXPREVALUATOR_H #define EXPREVALUATOR_H #include #include #include #include class ExprEvaluator { public: ExprEvaluator(); bool evaluate(QObject *object, const QString &exp); void setCaseSensitive(bool caseSensitive); private: #ifdef _MSC_VER QMap > m_operations; #else static const QMap > m_operations; #endif bool m_caseSensitive; bool subEval(const QString &oper, const QString &expresion, QObject *object); void parseExpr(const QString &exp, QVariant &value, QString &oper, QVariant &condition, QObject *object); }; #endif // EXPREVALUATOR_H