aboutsummaryrefslogtreecommitdiff
path: root/src/support/tuple
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/tuple')
-rw-r--r--src/support/tuple/mapper.h62
-rw-r--r--src/support/tuple/xobject_value.cc25
-rw-r--r--src/support/tuple/xobject_value.h17
3 files changed, 0 insertions, 104 deletions
diff --git a/src/support/tuple/mapper.h b/src/support/tuple/mapper.h
deleted file mode 100644
index 28c5f3b..0000000
--- a/src/support/tuple/mapper.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef INPUTXSLT_SRC_SUPPORT_TUPLE_MAPPER_H_
-#define INPUTXSLT_SRC_SUPPORT_TUPLE_MAPPER_H_
-
-#include <xalanc/XPath/XObject.hpp>
-
-#include <tuple>
-#include <type_traits>
-
-#include "common.h"
-#include "xobject_value.h"
-
-namespace InputXSLT {
-
-template <bool Condition>
-using enable_if = typename std::enable_if<Condition, std::size_t>::type;
-
-namespace Mapper {
- template <
- typename Target,
- std::size_t Index = 0,
- typename Current = std::tuple<>,
- enable_if<Index == std::tuple_size<Target>::value> = 0
- >
- inline Target construct(
- const xalan::XPathExecutionContext::XObjectArgVectorType&,
- Current&& current
- ) {
- return current;
- }
-
- template <
- typename Target,
- std::size_t Index = 0,
- typename Current = std::tuple<>,
- enable_if<Index < std::tuple_size<Target>::value> = 0
- >
- inline Target construct(
- const xalan::XPathExecutionContext::XObjectArgVectorType& source,
- Current&& current = std::tuple<>()
- ) {
- return construct<
- Target,
- Index + 1
- >(
- source,
- std::tuple_cat(
- current,
- std::make_tuple(
- XObjectValue::get<
- typename std::tuple_element<Index, Target>::type
- >(
- source[Index]
- )
- )
- )
- );
- }
-}
-
-}
-
-#endif // INPUTXSLT_SRC_SUPPORT_TUPLE_MAPPER_H_
diff --git a/src/support/tuple/xobject_value.cc b/src/support/tuple/xobject_value.cc
deleted file mode 100644
index cdeb9c6..0000000
--- a/src/support/tuple/xobject_value.cc
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "xobject_value.h"
-
-#include <boost/algorithm/string.hpp>
-
-#include <string>
-
-#include "support/xalan_string.h"
-
-namespace InputXSLT {
-
-namespace XObjectValue {
-
-template <>
-std::string get<std::string>(const xalan::XObjectPtr& ptr) {
- return boost::trim_copy(toString(ptr->str()));
-}
-
-template <>
-xalan::XObjectPtr get<xalan::XObjectPtr>(const xalan::XObjectPtr& ptr) {
- return ptr;
-}
-
-}
-
-}
diff --git a/src/support/tuple/xobject_value.h b/src/support/tuple/xobject_value.h
deleted file mode 100644
index bb602a4..0000000
--- a/src/support/tuple/xobject_value.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef INPUTXSLT_SRC_SUPPORT_TUPLE_XOBJECT_VALUE_H_
-#define INPUTXSLT_SRC_SUPPORT_TUPLE_XOBJECT_VALUE_H_
-
-#include <xalanc/XPath/XObject.hpp>
-
-#include "common.h"
-
-namespace InputXSLT {
-
-namespace XObjectValue {
- template <typename Type>
- Type get(const xalan::XObjectPtr&);
-}
-
-}
-
-#endif // INPUTXSLT_SRC_SUPPORT_TUPLE_XOBJECT_VALUE_H_