Provides set of logical operations for the parser.
#include <QtxEvalExpr.h>
|
static QString | Name () |
| Get operations set name. More...
|
|
QtxEvalSetLogic::QtxEvalSetLogic |
( |
| ) |
|
QtxEvalSetLogic::~QtxEvalSetLogic |
( |
| ) |
|
|
virtual |
Process binary operation with values v1 and v2. For unary operation the is invalid. The result of the operation is returned in the parameter v1.
- Parameters
-
op | operation name |
v1 | first argument (not valid for unary prefix operations) |
v2 | second argument (not valid for unary postfix operations) |
- Returns
- error code (QtxEvalExpr::Error)
Implements QtxEvalSet.
References intValue(), and QtxEvalExpr::OK.
bool QtxEvalSetLogic::createValue |
( |
const QString & |
str, |
|
|
QVariant & |
val |
|
) |
| const |
|
virtual |
Create true
or false
value from string representation.
- Parameters
-
str | string representration of the value |
val | returning value |
- Returns
true
if str can be evaluated as custom value and false
otherwise (parameter)
Reimplemented from QtxEvalSet.
References QtxEvalSet::createValue().
int QtxEvalSetLogic::intValue |
( |
const QVariant & |
v | ) |
const |
|
private |
Note: the value is converted to the integer (not boolean) in order to compare integer numbers correctly.
- Parameters
-
- Returns
- converted value
QString QtxEvalSetLogic::Name |
( |
| ) |
|
|
static |
- Returns
- operations set name
QString QtxEvalSetLogic::name |
( |
| ) |
const |
|
virtual |
int QtxEvalSetLogic::priority |
( |
const QString & |
op, |
|
|
bool |
isBin |
|
) |
| const |
|
virtual |
Operation priority counts from 1. If the operation is impossible, this function returns value <= 0.
- Parameters
-
op | operation |
isBin | true if the operation is binary and false if it is unary |
- Returns
- operation priority
Implements QtxEvalSet.
The documentation for this class was generated from the following files: