Qt 4.8
|
Constructs a text node. This covers both computed and directly constructed text nodes. More...
#include <qdocumentconstructor_p.h>
Properties | |
QUrl | m_staticBaseURI |
Constructs a text node. This covers both computed and directly constructed text nodes.
Definition at line 74 of file qdocumentconstructor_p.h.
DocumentConstructor::DocumentConstructor | ( | const Expression::Ptr & | operand | ) |
Definition at line 52 of file qdocumentconstructor.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 111 of file qdocumentconstructor.cpp.
|
virtual |
Reimplemented from QPatternist::Expression.
Definition at line 56 of file qdocumentconstructor.cpp.
|
virtual |
Evaluates this Expression by sending its output to DynamicContext::outputReceiver().
Reimplemented from QPatternist::Expression.
Definition at line 73 of file qdocumentconstructor.cpp.
|
virtual |
The first operand must be exactly one xs:string
.
Implements QPatternist::Expression.
Definition at line 98 of file qdocumentconstructor.cpp.
|
virtual |
The default implementation returns 0. Override and let the function return a different value, if that's of interest.
An important decision when re-implementing properties() is whether to OR in the properties() of ones operands. For instance, if an operand has RequiresFocus set, that flag nost likely applies to the apparent as well, since it depends on its operand.
Reimplemented from QPatternist::Expression.
Definition at line 105 of file qdocumentconstructor.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 93 of file qdocumentconstructor.cpp.
|
virtual |
This implementation guarantees to never rewrite away this Expression, but at most rewrite it as a child of another expression(that presumably have a type checking role). It is therefore always safe to override this function and call this implementation and not worry about that this Expression becomes deleted.
Many Expressions override typeCheck() and performs optimizations, as opposed to doing it in the compress() stage. This is due to that the design of those Expressions often are tied to that certain simplifications are done at the typeCheck() stage of the compilation process or that it in some other way is related to what the typeCheck() do. Also, the earlier the AST can be simplified, the better the chances are for subsequent optimizations.
It is important that the super class's typeCheck() is called before doing any custom type checking, since the call can change the children(notably, the childrens' static types). For example, if the Expression, MyExpression in the example, does not match the required type, typeCheck returns the Expression wrapped in for example ItemVerifier, CardinalityVerifier, or both.
typeCheck() may be called many times. typeCheck() must either raise an error if this Expression is an invalid expression. Thus, it is guaranteed that an Expression is valid after typeCheck() is called.
context | supplies information, such as namespace bindings and available function signatures, that can be needed at compilation time. context is guaranteed by the caller to never null. |
reqType | the static type that this Expression must match when evaluated. reqType is guaranteed by the caller to never null. |
reqType
Reimplemented from QPatternist::Expression.
Definition at line 86 of file qdocumentconstructor.cpp.
|
private |
Definition at line 95 of file qdocumentconstructor_p.h.
Referenced by evaluateSingleton(), and typeCheck().