Qt 4.8
|
Implements the function fn:normalize-unicode()
.
More...
#include <qstringvaluefns_p.h>
Private Functions | |
int | determineNormalizationForm (const DynamicContext::Ptr &context) const |
Properties | |
QString::NormalizationForm | m_normForm |
Implements the function fn:normalize-unicode()
.
What perhaps can be said significant with the implementation, is that it attempts to determine the normalization form at compile time, in order to reduce string work at runtime.
Definition at line 152 of file qstringvaluefns_p.h.
NormalizeUnicodeFN::NormalizeUnicodeFN | ( | ) |
Initializes private data.
Definition at line 172 of file qstringvaluefns.cpp.
|
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 209 of file qstringvaluefns.cpp.
|
private |
Definition at line 234 of file qstringvaluefns.cpp.
Referenced by compress(), and evaluateSingleton().
|
virtual |
Reimplemented from QPatternist::Expression.
Definition at line 186 of file qstringvaluefns.cpp.
|
private |
Definition at line 164 of file qstringvaluefns_p.h.
Referenced by compress(), and evaluateSingleton().