aboutsummaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/support')
-rw-r--r--src/support/stylesheet_parameter_guard.cc46
-rw-r--r--src/support/stylesheet_parameter_guard.h37
2 files changed, 0 insertions, 83 deletions
diff --git a/src/support/stylesheet_parameter_guard.cc b/src/support/stylesheet_parameter_guard.cc
deleted file mode 100644
index 399bccb..0000000
--- a/src/support/stylesheet_parameter_guard.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "stylesheet_parameter_guard.h"
-
-namespace InputXSLT {
-
-StylesheetParameterGuard::StylesheetParameterGuard(
- xalan::XalanTransformer& transformer
-): transformer_(transformer) { }
-
-StylesheetParameterGuard::StylesheetParameterGuard(
- xalan::XalanTransformer& transformer,
- const map& parameters
-): transformer_(transformer) {
- this->set(parameters);
-}
-
-StylesheetParameterGuard::~StylesheetParameterGuard() {
- this->transformer_.clearStylesheetParams();
-}
-
-void StylesheetParameterGuard::set(const map& parameters) {
- for ( auto&& parameter : parameters ) {
- this->set(parameter.first, parameter.second);
- }
-}
-
-void StylesheetParameterGuard::set(
- const std::string& key,
- const std::string& value
-) {
- this->transformer_.setStylesheetParam(
- key.data(),
- std::string("'" + value + "'").data()
- );
-}
-
-void StylesheetParameterGuard::set(
- const std::string& key,
- const xalan::XObjectPtr& value
-) {
- this->transformer_.setStylesheetParam(
- key.data(),
- value
- );
-}
-
-}
diff --git a/src/support/stylesheet_parameter_guard.h b/src/support/stylesheet_parameter_guard.h
deleted file mode 100644
index 7fa425e..0000000
--- a/src/support/stylesheet_parameter_guard.h
+++ /dev/null
@@ -1,37 +0,0 @@
-#ifndef INPUTXSLT_SRC_SUPPORT_STYLESHEET_PARAMETER_GUARD_H_
-#define INPUTXSLT_SRC_SUPPORT_STYLESHEET_PARAMETER_GUARD_H_
-
-#include <xalanc/XalanTransformer/XalanTransformer.hpp>
-#include <xalanc/XPath/XObject.hpp>
-
-#include <string>
-#include <unordered_map>
-
-#include "common.h"
-
-namespace InputXSLT {
-
-class StylesheetParameterGuard {
- public:
- typedef std::unordered_map<std::string, std::string> map;
-
- explicit StylesheetParameterGuard(xalan::XalanTransformer&);
- StylesheetParameterGuard(
- xalan::XalanTransformer&,
- const map&
- );
-
- ~StylesheetParameterGuard();
-
- void set(const map&);
- void set(const std::string&, const std::string&);
- void set(const std::string&, const xalan::XObjectPtr&);
-
- private:
- xalan::XalanTransformer& transformer_;
-
-};
-
-}
-
-#endif // INPUTXSLT_SRC_SUPPORT_STYLESHEET_PARAMETER_GUARD_H_