NuriaProject Framework
0.1
The NuriaProject Framework
|
Field encapsulates a value-field for LazyCondition. More...
#include <lazyevaluation.hpp>
Public Types | |
enum | Type { Empty = 0, Value, Argument, TestCall, Custom = 50 } |
Public Member Functions | |
Field () | |
Field (int type, const QVariant &data) | |
Field (const Field &other) | |
int | customType () const |
LazyCondition | operator!= (const Field &other) |
template<typename T > | |
LazyCondition | operator!= (const T &other) |
LazyCondition | operator< (const Field &other) |
template<typename T > | |
LazyCondition | operator< (const T &other) |
LazyCondition | operator<= (const Field &other) |
template<typename T > | |
LazyCondition | operator<= (const T &other) |
LazyCondition | operator== (const Field &other) |
template<typename T > | |
LazyCondition | operator== (const T &other) |
LazyCondition | operator> (const Field &other) |
template<typename T > | |
LazyCondition | operator> (const T &other) |
LazyCondition | operator>= (const Field &other) |
template<typename T > | |
LazyCondition | operator>= (const T &other) |
QVariant | toVariant () const |
Type | type () const |
const QVariant & | value () const |
Field encapsulates a value-field for LazyCondition.
This class acts as a generic container for LazyConditions. You usually don't use it explicitly, but instead use the already defined methods to create instances of this class.
enum Nuria::Field::Type |
Field types.
Enumerator | |
---|---|
Empty |
Empty, invalid field. |
Value |
Value field.
|
Argument |
Argument reference, the value will be of type int.
|
TestCall |
A call to a named method. To be defined by the evaluator. |
Custom |
A custom type used in domain-specific environments, like references to table columns. This acts as a base value, users of this features should try to use unique type values. Example: enum { MyField = Nuria::Field::Custom + 1 }; |
Nuria::Field::Field | ( | ) |
Creates a instance of type Empty.
Nuria::Field::Field | ( | int | type, |
const QVariant & | data | ||
) |
Creates a instance of with value data.
Nuria::Field::Field | ( | const Field & | other | ) |
Copy constructor.
int Nuria::Field::customType | ( | ) | const |
Returns the custom type id if this is a custom type, or the regular type.
QVariant Nuria::Field::toVariant | ( | ) | const |
Puts this instance into a QVariant. If the type of this instance is of Empty or Value, the value itself will be returned. Else this instance will be put into a QVariant and then returned.
Type Nuria::Field::type | ( | ) | const |
Returns the type of this instance. If this is a custom instance, Custom will be returned.
const QVariant& Nuria::Field::value | ( | ) | const |
Returns the value of this instance.