SourceForge.net Logo

ExternalFunction.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2006
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2006
00005  *     Progress Software Corporation. All rights reserved.
00006  * Copyright (c) 2004-2006
00007  *     Oracle. All rights reserved.
00008  *
00009  * See the file LICENSE for redistribution information.
00010  *
00011  * $Id: ExternalFunction.hpp,v 1.3 2007/06/18 19:46:58 jpcs Exp $
00012  */
00013 
00014 #ifndef _EXTERNALFUNCTION_HPP
00015 #define _EXTERNALFUNCTION_HPP
00016 
00017 #include <xqilla/framework/XQillaExport.hpp>
00018 
00019 #include <xercesc/util/XMLUniDefs.hpp>
00020 
00021 class Result;
00022 class PendingUpdateList;
00023 class DynamicContext;
00024 class XPath2MemoryManager;
00025 
00026 class XQILLA_API ExternalFunction
00027 {
00028 public:
00029   class XQILLA_API Arguments
00030   {
00031   public:
00032     virtual ~Arguments() {}
00033 
00035     virtual Result getArgument(unsigned int index, DynamicContext *context) const = 0;
00036   };
00037 
00038   virtual ~ExternalFunction() {}
00039 
00040   const XMLCh *getURI() const { return uri_; }
00041   const XMLCh *getName() const { return name_; }
00042   const XMLCh *getURINameHash() const { return uriName_; }
00043   unsigned int getNumberOfArguments() const { return numArgs_; }
00044 
00046   virtual Result execute(const Arguments *args, DynamicContext *context) const;
00048   virtual PendingUpdateList executeUpdate(const Arguments *args, DynamicContext *context) const;
00049 
00050 protected:
00051   ExternalFunction(const XMLCh *uri, const XMLCh *name, unsigned int numberOfArgs, XPath2MemoryManager *mm);
00052 
00053   const XMLCh *uri_;
00054   const XMLCh *name_;
00055   const XMLCh *uriName_;
00056   unsigned int numArgs_;
00057 };
00058 
00059 #endif
00060 

Generated on Fri Aug 31 14:37:35 2007 for XQilla Simple API by  doxygen 1.5.1