Qt 4.8
|
Determines whether an Expression is a value or general comparison or both, with a certain operator. More...
#include <qoptimizerblocks_p.h>
Public Functions | |
ComparisonIdentifier (const QVector< Expression::ID > comparatorHosts, const AtomicComparator::Operator op) | |
virtual bool | matches (const Expression::Ptr &expr) const |
Public Functions inherited from QPatternist::ExpressionIdentifier | |
ExpressionIdentifier () | |
virtual | ~ExpressionIdentifier () |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Properties | |
const QVector< Expression::ID > | m_hosts |
const AtomicComparator::Operator | m_op |
Additional Inherited Members | |
Public Types inherited from QPatternist::ExpressionIdentifier | |
typedef QList< ExpressionIdentifier::Ptr > | List |
typedef QExplicitlySharedDataPointer< ExpressionIdentifier > | Ptr |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Determines whether an Expression is a value or general comparison or both, with a certain operator.
Definition at line 120 of file qoptimizerblocks_p.h.
ComparisonIdentifier::ComparisonIdentifier | ( | const QVector< Expression::ID > | comparatorHosts, |
const AtomicComparator::Operator | op | ||
) |
comparatorHosts | the possible parent that may have the operator. This may be Expression::IDGeneralComparison or Expression::IDValueComparison. The two values may also be OR'd, meaning any of them will do. |
op | the operator that the comparator host must have. For example, if op is AtomicComparator::OperatorGreatorOrEqual this ComparisonIdentifier will match operator >= in the case of IDGeneralComparison and 'ge' in the case of IDValueComparison. |
Definition at line 66 of file qoptimizerblocks.cpp.
|
virtual |
true
, if expr
is a ValueComparison with the operator passed in ComparisonIdentifier(). Implements QPatternist::ExpressionIdentifier.
Definition at line 72 of file qoptimizerblocks.cpp.
|
private |
Definition at line 145 of file qoptimizerblocks_p.h.
Referenced by matches().
|
private |
Definition at line 146 of file qoptimizerblocks_p.h.
Referenced by matches().