#ifndef EXPREVALUATOR_H #define EXPREVALUATOR_H #include #include #include #include #include "core_global.h" class CORESHARED_EXPORT ExprEvaluator { public: ExprEvaluator() = default; bool evaluate(QObject *object, const QString &exp); void setCaseSensitive(bool caseSensitive); private: static const QMap > m_operations; bool m_caseSensitive{false}; 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