/* * Copyright (c) 2001-2006 * DecisionSoft Limited. All rights reserved. * Copyright (c) 2004-2006 * Progress Software Corporation. All rights reserved. * Copyright (c) 2004-2006 * Oracle. All rights reserved. * * See the file LICENSE for redistribution information. * * $Id: FuncFactoryTemplate.hpp,v 1.8 2006/11/01 16:37:19 jpcs Exp $ */ /* Factory template class */ #ifndef _FUNCFACTORYTEMPLATE_HPP #define _FUNCFACTORYTEMPLATE_HPP #include #include ///Macro used to facilitate the creation of functions template class FuncFactoryTemplate : public FuncFactory { public: FuncFactoryTemplate() { } virtual ASTNode *createInstance(const VectorOfASTNodes &args, XPath2MemoryManager* memMgr) const { return new (memMgr) TYPE(args, memMgr); } virtual const XMLCh *getName() const { return TYPE::name; } virtual const XMLCh *getURI() const { return TYPE::XMLChFunctionURI; } virtual unsigned int getMinArgs() const { return TYPE::minArgs; } virtual unsigned int getMaxArgs() const { return TYPE::maxArgs; } }; #endif