17 #ifndef NURIA_LAZYEVALUATION_HPP
18 #define NURIA_LAZYEVALUATION_HPP
20 #include "essentials.hpp"
21 #include "callback.hpp"
22 #include "variant.hpp"
23 #include <QSharedData>
30 class AbstractConditionEvaluator;
31 class LazyConditionPrivate;
97 LazyCondition (
const QVariant &left, Type type,
const QVariant &right);
105 bool isValid ()
const;
114 const QVariant &left ()
const;
117 const QVariant &right ()
const;
120 operator QVariant ()
const;
139 template<
typename ... Args >
140 inline bool operator() (
const Args & ... args)
148 bool evaluate (
const QVariantList &arguments)
const;
163 QSharedDataPointer< LazyConditionPrivate > d;
214 Field (
int type,
const QVariant &data);
233 template<
typename T >
237 template<
typename T >
238 LazyCondition operator!= (
const T &other)
241 template<
typename T >
242 LazyCondition operator< (
const T &other)
245 template<
typename T >
246 LazyCondition operator<= (
const T &other)
249 template<
typename T >
250 LazyCondition operator> (
const T &other)
253 template<
typename T >
254 LazyCondition operator>= (
const T &other)
262 const QVariant &value ()
const;
275 int customType ()
const;
282 QVariant toVariant ()
const;
315 TestCall (
const QString &name,
const QVariantList &args);
324 bool isNative ()
const;
330 QString name ()
const;
342 const QVariantList &arguments ()
const;
354 template<
typename T >
inline Field val (
const T &value)
361 NURIA_CORE_EXPORT Field arg (
int index);
368 template<
typename ... Args >
369 Field test (
const QString &method,
const Args &... args) {
379 template<
typename ... Args >
392 NURIA_CORE_EXPORT QDebug operator<< (QDebug dbg,
const Nuria::TestCall &call);
393 NURIA_CORE_EXPORT QDebug operator<< (QDebug dbg,
const Nuria::Field &field);
398 Q_DECLARE_METATYPE(
Nuria::TestCall)
399 Q_DECLARE_METATYPE(
Nuria::Field)
401 #endif // NURIA_LAZYEVALUATION_HPP
A modern style callback mechanism which can be bound to various method types including slots...
Definition: callback.hpp:140
The TestCall class encapsulates a call to a test function for LazyCondition.
Definition: lazyevaluation.hpp:308
Evaluates to (left <= right).
Definition: lazyevaluation.hpp:77
Definition: lazyevaluation.hpp:186
static QVariantList buildList(const Items &...items)
Definition: variant.hpp:42
Definition: abstractsessionmanager.hpp:24
Definition: lazyevaluation.hpp:197
Evaluates to (left > right).
Definition: lazyevaluation.hpp:74
Definition: lazyevaluation.hpp:192
Invalid instance, evaluates to false.
Definition: lazyevaluation.hpp:70
Type
Definition: lazyevaluation.hpp:181
Field encapsulates a value-field for LazyCondition.
Definition: lazyevaluation.hpp:175
Type
Definition: lazyevaluation.hpp:68
The AbstractConditionEvaluator class.
Definition: conditionevaluator.hpp:30
Evaluates to (left >= right).
Definition: lazyevaluation.hpp:75
LazyCondition offers lazily evaluated conditions for C++.
Definition: lazyevaluation.hpp:62
Evaluates to (left == right).
Definition: lazyevaluation.hpp:72
Evaluates to (left).
Definition: lazyevaluation.hpp:71
Evaluates to (left < right).
Definition: lazyevaluation.hpp:76
Evaluates to (left != right).
Definition: lazyevaluation.hpp:73