Qt 4.8
|
An entry point for looking up and creating FunctionCall instances. More...
#include <qfunctionfactory_p.h>
Public Types | |
typedef QList< FunctionFactory::Ptr > | List |
typedef QExplicitlySharedDataPointer< FunctionFactory > | Ptr |
Public Functions | |
virtual Expression::Ptr | createFunctionCall (const QXmlName name, const Expression::List &arguments, const StaticContext::Ptr &context, const SourceLocationReflection *const r)=0 |
virtual FunctionSignature::Hash | functionSignatures () const =0 |
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... | |
Protected Functions | |
FunctionFactory () | |
This constructor cannot be removed, because it can't be synthesized, for some reason. More... | |
virtual FunctionSignature::Ptr | retrieveFunctionSignature (const NamePool::Ptr &np, const QXmlName name)=0 |
Additional Inherited Members | |
Public Variables inherited from QSharedData | |
QAtomicInt | ref |
An entry point for looking up and creating FunctionCall instances.
Definition at line 81 of file qfunctionfactory_p.h.
Definition at line 86 of file qfunctionfactory_p.h.
Definition at line 85 of file qfunctionfactory_p.h.
|
virtual |
Definition at line 50 of file qfunctionfactory.cpp.
|
inlineprotected |
This constructor cannot be removed, because it can't be synthesized, for some reason.
Definition at line 144 of file qfunctionfactory_p.h.
|
pure 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. Implemented in QPatternist::FunctionFactoryCollection, and QPatternist::AbstractFunctionFactory.
Referenced by QPatternist::ByIDCreator::create().
|
pure virtual |
Implemented in QPatternist::FunctionFactoryCollection, and QPatternist::AbstractFunctionFactory.
Referenced by hasSignature().
bool FunctionFactory::hasSignature | ( | const FunctionSignature::Ptr & | signature | ) | const |
Determines whether this FunctionFactory contains the function signature signature
.
The implementation uses functionSignatures().
Definition at line 65 of file qfunctionfactory.cpp.
|
virtual |
Determines whether a function with the name name
and arity arity
is available. The implementation operates on the result of retrieveFunctionSignature() to determine the result.
np | the NamePool. |
name | the name of the function. For example fn:string-join. |
arity | the number of arguments the function must have. |
Reimplemented in QPatternist::FunctionFactoryCollection.
Definition at line 54 of file qfunctionfactory.cpp.
Referenced by QPatternist::FunctionAvailableFN::evaluateSingleton().
|
protectedpure virtual |
This is a convenience function for sub-classes. It retrieves the function signature for function with name name
.
According to the specifications are function signatures identified by their name and arity, but currently is the arity not part of the signature.
If no function could be found for the given name, null
is returned.
Implemented in QPatternist::FunctionFactoryCollection, QPatternist::XPath20CoreFunctions, QPatternist::XPath10CoreFunctions, QPatternist::XSLT20CoreFunctions, and QPatternist::ConstructorFunctionsFactory.
Referenced by QPatternist::AbstractFunctionFactory::createFunctionCall(), FunctionFactory(), and isAvailable().