Qt 4.8
|
Contains data related to a template. More...
#include <qtemplate_p.h>
Public Types | |
typedef QExplicitlySharedDataPointer< Template > | Ptr |
typedef QVector< Template::Ptr > | Vector |
Public Functions | |
virtual const SourceLocationReflection * | actualReflection () const |
void | compileParameters (const StaticContext::Ptr &context) |
DynamicContext::Ptr | createContext (const TemplateInvoker *const invoker, const DynamicContext::Ptr &context, const bool isCallTemplate) const |
Expression::Properties | dependencies () const |
Expression::Properties | properties () const |
Template (const ImportPrecedence ip, const SequenceType::Ptr &reqType) | |
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... | |
Public Functions inherited from QPatternist::SourceLocationReflection | |
virtual QString | description () const |
virtual QSourceLocation | sourceLocation () const |
SourceLocationReflection () | |
virtual | ~SourceLocationReflection () |
Static Public Functions | |
static void | raiseXTSE0680 (const ReportContext::Ptr &context, const QXmlName &name, const SourceLocationReflection *const reflection) |
Public Variables | |
Expression::Ptr | body |
const ImportPrecedence | importPrecedence |
VariableDeclaration::List | templateParameters |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Private Functions | |
DynamicContext::TemplateParameterHash | parametersAsHash () const |
Properties | |
const SequenceType::Ptr | m_reqType |
Contains data related to a template.
A Template is associated with a mode, by being housed inside a TemplateMode instance.
Template has role very similar to UserFunction.
Definition at line 84 of file qtemplate_p.h.
Definition at line 89 of file qtemplate_p.h.
Definition at line 90 of file qtemplate_p.h.
|
inline |
Definition at line 92 of file qtemplate_p.h.
|
virtual |
Returns this
.
Implements QPatternist::SourceLocationReflection.
Definition at line 51 of file qtemplate.cpp.
void Template::compileParameters | ( | const StaticContext::Ptr & | context | ) |
Since we have our template parameters in templateParameters, we need this separate step to do the regular phases: Expression::typeCheck(), and Expression::compress().
Definition at line 172 of file qtemplate.cpp.
DynamicContext::Ptr Template::createContext | ( | const TemplateInvoker *const | invoker, |
const DynamicContext::Ptr & | context, | ||
const bool | isCallTemplate | ||
) | const |
If isCallTemplate
, the caller is xsl:call-template
, as opposed to for instance xsl:apply-templates
. This affects error reporting.
Parameters or not, we must in any case create a new stack frame for the template invocation since otherwise we will trash our existing variables. Hence it's as with calling user functions.
This is especially reproducible with recursive functions.
Definition at line 81 of file qtemplate.cpp.
Referenced by QPatternist::CallTemplate::evaluateEBV(), QPatternist::CallTemplate::evaluateSequence(), QPatternist::ApplyTemplate::evaluateSequence(), and QPatternist::CallTemplate::evaluateToSequenceReceiver().
Expression::Properties Template::dependencies | ( | ) | const |
Definition at line 213 of file qtemplate.cpp.
Referenced by QPatternist::CallTemplate::dependencies().
|
private |
Definition at line 56 of file qtemplate.cpp.
Referenced by createContext().
Expression::Properties Template::properties | ( | ) | const |
A value which takes into account the body and its template parameters.
Definition at line 193 of file qtemplate.cpp.
Referenced by QPatternist::CallTemplate::properties().
|
static |
Definition at line 70 of file qtemplate.cpp.
Referenced by createContext(), and QPatternist::CallTemplate::typeCheck().
Expression::Ptr QPatternist::Template::body |
Definition at line 98 of file qtemplate_p.h.
Referenced by QPatternist::CallTemplate::body(), dependencies(), QPatternist::CallTemplate::evaluateEBV(), QPatternist::CallTemplate::evaluateSequence(), QPatternist::ApplyTemplate::evaluateSequence(), QPatternist::CallTemplate::evaluateToSequenceReceiver(), QPatternist::CallTemplate::properties(), and properties().
const ImportPrecedence QPatternist::Template::importPrecedence |
Definition at line 105 of file qtemplate_p.h.
Referenced by QPatternist::ApplyTemplate::findTemplate().
|
private |
Definition at line 139 of file qtemplate_p.h.
VariableDeclaration::List QPatternist::Template::templateParameters |
Definition at line 107 of file qtemplate_p.h.
Referenced by compileParameters(), createContext(), dependencies(), parametersAsHash(), properties(), and QPatternist::CallTemplate::typeCheck().