aboutsummaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
authorAdrian Kummerländer2014-06-07 17:24:44 +0200
committerAdrian Kummerländer2014-06-07 17:24:44 +0200
commit5f6fc45749b99e9013f04c95a525f2d627db01bf (patch)
tree6ba7598c874b89e893fb9b5f66e2cf26a85ac063 /src/support
parent272b34c1a4639cd0f909bfb52d30339c93b0c42b (diff)
downloadInputXSLT-5f6fc45749b99e9013f04c95a525f2d627db01bf.tar
InputXSLT-5f6fc45749b99e9013f04c95a525f2d627db01bf.tar.gz
InputXSLT-5f6fc45749b99e9013f04c95a525f2d627db01bf.tar.bz2
InputXSLT-5f6fc45749b99e9013f04c95a525f2d627db01bf.tar.lz
InputXSLT-5f6fc45749b99e9013f04c95a525f2d627db01bf.tar.xz
InputXSLT-5f6fc45749b99e9013f04c95a525f2d627db01bf.tar.zst
InputXSLT-5f6fc45749b99e9013f04c95a525f2d627db01bf.zip
Improved FunctionBase constructDocument parameter propagation
* replaced std::tuple constructing Mapper template methods with direct XObjectArgVectorType unpacking ** XObjectValue::get template method is applied directly using parameter pack unpacking * implemented custom IndexSequence / Sequence type to provide vector indexes * modified all external functions to provide matching constructDocument overloads
Diffstat (limited to 'src/support')
-rw-r--r--src/support/tuple/mapper.h62
-rw-r--r--src/support/type/xobject_value.cc (renamed from src/support/tuple/xobject_value.cc)0
-rw-r--r--src/support/type/xobject_value.h (renamed from src/support/tuple/xobject_value.h)0
3 files changed, 0 insertions, 62 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/type/xobject_value.cc
index cdeb9c6..cdeb9c6 100644
--- a/src/support/tuple/xobject_value.cc
+++ b/src/support/type/xobject_value.cc
diff --git a/src/support/tuple/xobject_value.h b/src/support/type/xobject_value.h
index bb602a4..bb602a4 100644
--- a/src/support/tuple/xobject_value.h
+++ b/src/support/type/xobject_value.h