From a45c37a31eae86424d3b72ebb07604d6d1fa8bd3 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Tue, 15 Jul 2014 22:08:40 +0200 Subject: Fixed PlatformGuard name spelling * its called a "platform" and not a "plattform" as in German... --- src/platform_guard.cc | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++ src/platform_guard.h | 25 ++++++++++++++++++ src/plattform_guard.cc | 72 -------------------------------------------------- src/plattform_guard.h | 25 ------------------ 4 files changed, 97 insertions(+), 97 deletions(-) create mode 100644 src/platform_guard.cc create mode 100644 src/platform_guard.h delete mode 100644 src/plattform_guard.cc delete mode 100644 src/plattform_guard.h (limited to 'src') diff --git a/src/platform_guard.cc b/src/platform_guard.cc new file mode 100644 index 0000000..6be5b4a --- /dev/null +++ b/src/platform_guard.cc @@ -0,0 +1,72 @@ +#include "platform_guard.h" + +#include +#include + +#include + +#include "common.h" +#include "function/read_file.h" +#include "function/write_file.h" +#include "function/read_directory.h" +#include "function/transform.h" +#include "function/generate.h" +#include "function/external_text_formatter.h" + +namespace InputXSLT { + +PlatformGuard::PlatformGuard(const std::vector& path): + include_resolver_(path) { + xercesc::XMLPlatformUtils::Initialize(); + xalan::XalanTransformer::initialize(); + + const xalan::XalanDOMString customNamespace( + "function.inputxslt.application" + ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, + xalan::XalanDOMString("read-file"), + InputXSLT::FunctionReadFile(&this->include_resolver_) + ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, + xalan::XalanDOMString("write-file"), + InputXSLT::FunctionWriteFile(&this->include_resolver_) + ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, + xalan::XalanDOMString("read-directory"), + InputXSLT::FunctionReadDirectory(&this->include_resolver_) + ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, + xalan::XalanDOMString("transform"), + InputXSLT::FunctionTransform(&this->include_resolver_) + ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, + xalan::XalanDOMString("generate"), + InputXSLT::FunctionGenerate(&this->include_resolver_) + ); + + xalan::XalanTransformer::installExternalFunctionGlobal( + customNamespace, + xalan::XalanDOMString("external-text-formatter"), + InputXSLT::FunctionExternalTextFormatter(&this->include_resolver_) + ); +} + +PlatformGuard::~PlatformGuard() { + xalan::XalanTransformer::terminate(); +} + +IncludeEntityResolver* PlatformGuard::getEntityResolver() { + return &this->include_resolver_; +} + +} diff --git a/src/platform_guard.h b/src/platform_guard.h new file mode 100644 index 0000000..ff72207 --- /dev/null +++ b/src/platform_guard.h @@ -0,0 +1,25 @@ +#ifndef INPUTXSLT_SRC_PLATFORM_GUARD_H_ +#define INPUTXSLT_SRC_PLATFORM_GUARD_H_ + +#include +#include + +#include "support/include_entity_resolver.h" + +namespace InputXSLT { + +class PlatformGuard { + public: + PlatformGuard(const std::vector&); + ~PlatformGuard(); + + IncludeEntityResolver* getEntityResolver(); + + private: + IncludeEntityResolver include_resolver_; + +}; + +} + +#endif // INPUTXSLT_SRC_PLATFORM_GUARD_H_ diff --git a/src/plattform_guard.cc b/src/plattform_guard.cc deleted file mode 100644 index 5d19e32..0000000 --- a/src/plattform_guard.cc +++ /dev/null @@ -1,72 +0,0 @@ -#include "plattform_guard.h" - -#include -#include - -#include - -#include "common.h" -#include "function/read_file.h" -#include "function/write_file.h" -#include "function/read_directory.h" -#include "function/transform.h" -#include "function/generate.h" -#include "function/external_text_formatter.h" - -namespace InputXSLT { - -PlattformGuard::PlattformGuard(const std::vector& path): - include_resolver_(path) { - xercesc::XMLPlatformUtils::Initialize(); - xalan::XalanTransformer::initialize(); - - const xalan::XalanDOMString customNamespace( - "function.inputxslt.application" - ); - - xalan::XalanTransformer::installExternalFunctionGlobal( - customNamespace, - xalan::XalanDOMString("read-file"), - InputXSLT::FunctionReadFile(&this->include_resolver_) - ); - - xalan::XalanTransformer::installExternalFunctionGlobal( - customNamespace, - xalan::XalanDOMString("write-file"), - InputXSLT::FunctionWriteFile(&this->include_resolver_) - ); - - xalan::XalanTransformer::installExternalFunctionGlobal( - customNamespace, - xalan::XalanDOMString("read-directory"), - InputXSLT::FunctionReadDirectory(&this->include_resolver_) - ); - - xalan::XalanTransformer::installExternalFunctionGlobal( - customNamespace, - xalan::XalanDOMString("transform"), - InputXSLT::FunctionTransform(&this->include_resolver_) - ); - - xalan::XalanTransformer::installExternalFunctionGlobal( - customNamespace, - xalan::XalanDOMString("generate"), - InputXSLT::FunctionGenerate(&this->include_resolver_) - ); - - xalan::XalanTransformer::installExternalFunctionGlobal( - customNamespace, - xalan::XalanDOMString("external-text-formatter"), - InputXSLT::FunctionExternalTextFormatter(&this->include_resolver_) - ); -} - -PlattformGuard::~PlattformGuard() { - xalan::XalanTransformer::terminate(); -} - -IncludeEntityResolver* PlattformGuard::getEntityResolver() { - return &this->include_resolver_; -} - -} diff --git a/src/plattform_guard.h b/src/plattform_guard.h deleted file mode 100644 index ccc9449..0000000 --- a/src/plattform_guard.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef INPUTXSLT_SRC_PLATTFORM_GUARD_H_ -#define INPUTXSLT_SRC_PLATTFORM_GUARD_H_ - -#include -#include - -#include "support/include_entity_resolver.h" - -namespace InputXSLT { - -class PlattformGuard { - public: - PlattformGuard(const std::vector&); - ~PlattformGuard(); - - IncludeEntityResolver* getEntityResolver(); - - private: - IncludeEntityResolver include_resolver_; - -}; - -} - -#endif // INPUTXSLT_SRC_PLATTFORM_GUARD_H_ -- cgit v1.2.3