Qt 4.8
|
Base-class for functions that compares strings and provides an opportunity to optimize compares intended to be case insensitive. More...
#include <qcomparescaseaware_p.h>
Properties | |
Qt::CaseSensitivity | m_caseSensitivity |
Base-class for functions that compares strings and provides an opportunity to optimize compares intended to be case insensitive.
Definition at line 70 of file qcomparescaseaware_p.h.
ComparesCaseAware::ComparesCaseAware | ( | ) |
Performs initialization.
Definition at line 50 of file qcomparescaseaware.cpp.
|
inline |
Tells whether the return value of the two operands must be compared case insensitively or not.
Definition at line 84 of file qcomparescaseaware_p.h.
Referenced by QPatternist::ContainsFN::evaluateSingleton(), QPatternist::CodepointEqualFN::evaluateSingleton(), QPatternist::StartsWithFN::evaluateSingleton(), QPatternist::CompareFN::evaluateSingleton(), and QPatternist::EndsWithFN::evaluateSingleton().
|
virtual |
compress() is the last stage performs in compiling an expression, done after the initial AST build and calling typeCheck(). compress() performs crucial simplifications, either by having drastic performance implications or that some expressions depend on it for proper behavior.
The default implementation performs a sparse conditional constant propagation. In short, a recursive process is performed in the AST which examines if the Expression's operands are constant values, and if so, performs a const fold(AST rewrite) into the result of evaluating the expression in question. This default behavior can be disabled by letting properties() return DisableElimination.
This compress() stage can be relative effective due to the design of XPath, in part because intrinsic functions are heavily used. Many Expressions override compress() and do optimizations specific to what they do. Also, many Expressions performs optimizations in their typeCheck().
context | the static context. Supplies compile time information, and is the channel for communicating error messages. |
Reimplemented from QPatternist::Expression.
Definition at line 54 of file qcomparescaseaware.cpp.
|
private |
Definition at line 90 of file qcomparescaseaware_p.h.
Referenced by caseSensitivity(), and compress().