Qt 4.8
|
Supplies convenience code for the function factories. More...
#include <qabstractfunctionfactory_p.h>
Public Functions | |
virtual Expression::Ptr | createFunctionCall (const QXmlName name, const Expression::List &arguments, const StaticContext::Ptr &context, const SourceLocationReflection *const r) |
virtual FunctionSignature::Hash | functionSignatures () const |
Public Functions inherited from QPatternist::FunctionFactory | |
bool | hasSignature (const FunctionSignature::Ptr &signature) const |
virtual bool | isAvailable (const NamePool::Ptr &np, const QXmlName name, const xsInteger arity) |
virtual | ~FunctionFactory () |
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... | |
Static Protected Functions | |
static QXmlName::LocalNameCode | argument (const NamePool::Ptr &np, const char *const name) |
Protected Variables | |
FunctionSignature::Hash | m_signatures |
Private Functions | |
void | verifyArity (const FunctionSignature::Ptr &sign, const StaticContext::Ptr &context, const xsInteger arity, const SourceLocationReflection *const r) const |
Determines whether arity is a valid number of arguments for the function with signature sign . More... | |
Additional Inherited Members | |
Public Types inherited from QPatternist::FunctionFactory | |
typedef QList< FunctionFactory::Ptr > | List |
typedef QExplicitlySharedDataPointer< FunctionFactory > | Ptr |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
Supplies convenience code for the function factories.
Definition at line 75 of file qabstractfunctionfactory_p.h.
|
inlineprotected |
Definition at line 99 of file qabstractfunctionfactory_p.h.
Referenced by QPatternist::XPath10CoreFunctions::retrieveFunctionSignature(), QPatternist::XSLT20CoreFunctions::retrieveFunctionSignature(), and QPatternist::XPath20CoreFunctions::retrieveFunctionSignature().
|
inlineprotected |
Definition at line 113 of file qabstractfunctionfactory_p.h.
|
inlinestaticprotected |
Definition at line 130 of file qabstractfunctionfactory_p.h.
Referenced by QPatternist::XPath10CoreFunctions::retrieveFunctionSignature(), QPatternist::XSLT20CoreFunctions::retrieveFunctionSignature(), and QPatternist::XPath20CoreFunctions::retrieveFunctionSignature().
|
virtual |
Creates a function call implementation.
A FunctionFactory represents a set of functions, which it is able to instantiate and to serve FunctionSignatures for. Conventionally, a FunctionFactory per namespace exists.
name
exists, but leave that to the callee. name | the name of the function to create. In Clark syntax, this could for example be {http://www.w3.org/2005/04/xpath-functions}lower-case |
arguments | the function's operands |
context | the usual StaticContext which supplies compile time data and reporting functionality. |
r | the SourceLocationReflection that identifies the callsite. |
name
. Or, a static error was raised. Implements QPatternist::FunctionFactory.
Definition at line 50 of file qabstractfunctionfactory.cpp.
|
virtual |
Implements QPatternist::FunctionFactory.
Definition at line 98 of file qabstractfunctionfactory.cpp.
Referenced by QPatternist::ConstructorFunctionsFactory::retrieveFunctionSignature(), QPatternist::XSLT20CoreFunctions::retrieveFunctionSignature(), QPatternist::XPath10CoreFunctions::retrieveFunctionSignature(), and QPatternist::XPath20CoreFunctions::retrieveFunctionSignature().
|
protectedpure virtual |
This function is responsible for creating the actual Expression, corresponding to localName
and the function signature sign
. It is called by createFunctionCall(), once it have been determined the function actually exists and have the correct arity.
This function will only be called for names in the fn
namespace.
Implemented in QPatternist::XPath20CoreFunctions, QPatternist::ConstructorFunctionsFactory, QPatternist::XPath10CoreFunctions, and QPatternist::XSLT20CoreFunctions.
Referenced by createFunctionCall().
|
private |
Determines whether arity
is a valid number of arguments for the function with signature sign
.
If it is not, a static error with error code ReportContext::XPST0017 is issued via context
.
Definition at line 67 of file qabstractfunctionfactory.cpp.
Referenced by createFunctionCall().
|
protected |
Definition at line 135 of file qabstractfunctionfactory_p.h.
Referenced by addFunction(), QPatternist::ConstructorFunctionsFactory::ConstructorFunctionsFactory(), and functionSignatures().