You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
prodejna/core/exprevaluator.h

27 lines
503 B
C++

#ifndef EXPREVALUATOR_H
#define EXPREVALUATOR_H
#include <QMap>
#include <QString>
#include <QVariant>
#include <functional>
class ExprEvaluator
{
public:
ExprEvaluator();
bool evaluate(const QObject *data, const QString &expression);
private:
#ifdef _MSC_VER
QMap<QString, std::function<bool(QVariant, QVariant)> > m_operations;
#else
static const QMap<QString, std::function<bool(QVariant, QVariant)> > m_operations;
#endif
bool m_caseSensitive;
};
#endif // EXPREVALUATOR_H