Public Member Functions | Protected Attributes
zorba::Function Class Reference

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. More...

#include <zorba/function.h>

Inheritance diagram for zorba::Function:
Inheritance graph
[legend]
Collaboration diagram for zorba::Function:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void addReference () const
virtual void free ()
virtual void getAnnotations (std::vector< Annotation_t > &annotations) const =0
virtual size_t getArity () const =0
virtual String getLocalName () const =0
virtual Item getQName () const =0
long getRefCount () const
virtual String getURI () const =0
virtual bool isBuiltin () const =0
virtual bool isDeterministic () const =0
virtual bool isExternal () const =0
virtual bool isPrivate () const =0
virtual bool isSequential () const =0
virtual bool isUpdating () const =0
virtual bool isVariadic () const =0
virtual bool isXQuery () const =0
void removeReference ()
virtual ~Function ()
 Destructor.

Protected Attributes

unsigned int theRefCount

Detailed Description

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.

Definition at line 45 of file function.h.


Constructor & Destructor Documentation

virtual zorba::Function::~Function ( )
inlinevirtual

Destructor.

Definition at line 50 of file function.h.


Member Function Documentation

void zorba::SmartObject::addReference ( ) const
inlineinherited

Definition at line 40 of file smart_ptr.h.

virtual void zorba::SmartObject::free ( )
virtualinherited
virtual void zorba::Function::getAnnotations ( std::vector< Annotation_t > &  annotations) const
pure virtual
virtual size_t zorba::Function::getArity ( ) const
pure virtual
Returns:
The arity of the function. If the function is variadic (which is possible only for builtin functions), the result of this method is non-deterministic.
virtual String zorba::Function::getLocalName ( ) const
pure virtual
Returns:
The local name of the function QName
virtual Item zorba::Function::getQName ( ) const
pure virtual
Returns:
The expanded QName of the function
long zorba::SmartObject::getRefCount ( ) const
inlineinherited

Definition at line 38 of file smart_ptr.h.

virtual String zorba::Function::getURI ( ) const
pure virtual
Returns:
The namespace URI of the function QName
virtual bool zorba::Function::isBuiltin ( ) const
pure virtual
Returns:
True if the function is a builtin one (not declared in any prolog); false otherwise
virtual bool zorba::Function::isDeterministic ( ) const
pure virtual
Returns:
True if the function is deterministic; false otherwise.
virtual bool zorba::Function::isExternal ( ) const
pure virtual
Returns:
True if the function is an external one; false otherwise
virtual bool zorba::Function::isPrivate ( ) const
pure virtual
Returns:
True if the function is private; false otherwise.
virtual bool zorba::Function::isSequential ( ) const
pure virtual
Returns:
True if the function is sequential; false otherwise.
virtual bool zorba::Function::isUpdating ( ) const
pure virtual
Returns:
True if the function is updating; false otherwise.
virtual bool zorba::Function::isVariadic ( ) const
pure virtual
Returns:
True if the function is variadic; false otherwise
virtual bool zorba::Function::isXQuery ( ) const
pure virtual
Returns:
True if the function implementation is written in XQuery (or equivalently, it is a non-external function with a Prolog declaration); false otherwise
void zorba::SmartObject::removeReference ( )
inlineinherited

Definition at line 42 of file smart_ptr.h.


Member Data Documentation

unsigned int zorba::SmartObject::theRefCount
mutableprotectedinherited

Definition at line 27 of file smart_ptr.h.


The documentation for this class was generated from the following file:
blog comments powered by Disqus