SourceForge.net Logo
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

FunctionRef.hpp

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2001-2007
00003  *     DecisionSoft Limited. All rights reserved.
00004  * Copyright (c) 2004-2007
00005  *     Oracle. All rights reserved.
00006  *
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  *
00011  *     http://www.apache.org/licenses/LICENSE-2.0
00012  *
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  *
00019  * $Id: FunctionRef.hpp 531 2008-04-10 23:23:07Z jpcs $
00020  */
00021 
00022 #ifndef _XQILLAFUNCTIONREF_HPP
00023 #define _XQILLAFUNCTIONREF_HPP
00024 
00025 #include <vector>
00026 
00027 #include <xqilla/items/Item.hpp>
00028 #include <xqilla/items/ATQNameOrDerived.hpp>
00029 #include <xqilla/runtime/Result.hpp>
00030 
00031 class DynamicContext;
00032 class LocationInfo;
00033 
00034 typedef std::vector<Result> VectorOfResults;
00035 
00036 class XQILLA_API FunctionRef : public Item
00037 {
00038 public:
00039   typedef RefCountPointer<const FunctionRef> Ptr;
00040 
00041   virtual bool isNode() const { return false; }
00042   virtual bool isAtomicValue() const { return false; }
00043   virtual bool isFunction() const { return true; }
00044 
00045   virtual const XMLCh *getTypeURI() const { return 0; }
00046   virtual const XMLCh *getTypeName() const { return 0; }
00047 
00048   virtual ATQNameOrDerived::Ptr getName(const DynamicContext *context) const = 0;
00049   virtual size_t getNumArgs() const = 0;
00050   virtual Result execute(const VectorOfResults &args, DynamicContext *context, const LocationInfo *location) const = 0;
00051   virtual FunctionRef::Ptr partialApply(const Result &arg, unsigned int argNum, DynamicContext *context, const LocationInfo *location) const = 0;
00052 
00053 protected:
00054   FunctionRef() {}
00055 };
00056 #endif

Generated on Fri Sep 25 06:55:26 2009 for XQilla Simple API by  doxygen 1.3.9.1