From 943768ad437011756395b86958399992e6822604 Mon Sep 17 00:00:00 2001 From: Adrian Kummerländer Date: Wed, 14 May 2014 16:41:58 +0200 Subject: Added ArgumentCount parameter to FunctionBase template * constructDocument member method is provided with a FunctionBase::argument_array instance * improved argument validation in FunctionBase * this parameter was added to support FunctionBase as a base class for FunctionTransform --- src/function/transform.h | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) (limited to 'src/function/transform.h') diff --git a/src/function/transform.h b/src/function/transform.h index 41bba05..fc735f0 100644 --- a/src/function/transform.h +++ b/src/function/transform.h @@ -1,40 +1,21 @@ #ifndef INPUTXSLT_SRC_FUNCTION_TRANSFORM_H_ #define INPUTXSLT_SRC_FUNCTION_TRANSFORM_H_ -#include -#include -#include -#include - -#include - -#include "common.h" -#include "support/dom/document_cache.h" -#include "support/filesystem_context.h" +#include "base.h" namespace InputXSLT { -class FunctionTransform : public xalan::Function { +class FunctionTransform : public FunctionBase { public: - FunctionTransform(); - - virtual xalan::XObjectPtr execute( - xalan::XPathExecutionContext&, - xalan::XalanNode*, - const xalan::XObjectPtr, - const xalan::XObjectPtr, - const xalan::Locator* - ) const; - - virtual FunctionTransform* clone(xalan::MemoryManager&) const; - - FunctionTransform& operator=(const FunctionTransform&) = delete; - bool operator==(const FunctionTransform&) const = delete; + using FunctionBase::FunctionBase; - private: - std::shared_ptr document_cache_; + protected: + friend FunctionBase; - const xalan::XalanDOMString& getError(xalan::XalanDOMString&) const; + xercesc::DOMDocument* constructDocument( + const FilesystemContext&, + const FunctionBase::argument_array& + ); }; -- cgit v1.2.3