zorba::Function#include <zorba/function.h> Inherited from: zorba::SmartObject The Function class represents a function that is callable from XQuery code, and it gives access to the various properties that are specified in the declaration of the function within a Prolog. Instances of Function are returned by the StaticContext::findFunctions() method. To be mopre precise, StaticContext::findFunctions() returns smart pointers to Function objects. These smart pointers must be destroyed before the StaticContext object they were obtained from is destroyed.Note: Builtin functions are not declared in the Prolog, but the same kind of properties exist for them as well. So, the Function class works for builtin functions as well.Public Functions
Protected Attributes
Public FunctionsaddReferencevoid addReference() const
freevoid free()
getAnnotationsvoid getAnnotations(std::vector< Annotation_t > &annotations) const =0
getAritysize_t getArity() const =0
ReturnsThe arity of the function. If the function is variadic (which is possible only for builtin functions), the result of this method is non-deterministic.getRefCountlong getRefCount() const
isBuiltinbool isBuiltin() const =0
ReturnsTrue if the function is a builtin one (not declared in any prolog); false otherwiseisDeterministicbool isDeterministic() const =0
ReturnsTrue if the function is deterministic; false otherwise.isExternalbool isExternal() const =0
ReturnsTrue if the function is an external one; false otherwiseisPrivatebool isPrivate() const =0
ReturnsTrue if the function is private; false otherwise.isSequentialbool isSequential() const =0
ReturnsTrue if the function is sequential; false otherwise.isUpdatingbool isUpdating() const =0
ReturnsTrue if the function is updating; false otherwise.isVariadicbool isVariadic() const =0
ReturnsTrue if the function is variadic; false otherwiseisXQuerybool isXQuery() const =0
ReturnsTrue if the function implementation is written in XQuery (or equivalently, it is a non-external function with a Prolog declaration); false otherwiseremoveReferencevoid removeReference()
~Function ~Function() Destructor.
Protected AttributestheRefCountunsigned int theRefCount
|