aboutsummaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
Diffstat (limited to 'src/support')
-rw-r--r--src/support/filesystem_context.h2
-rw-r--r--src/support/include_entity_resolver.cc2
-rw-r--r--src/support/include_entity_resolver.h2
-rw-r--r--src/support/type/filter.h24
-rw-r--r--src/support/type/xobject_value.cc13
5 files changed, 39 insertions, 4 deletions
diff --git a/src/support/filesystem_context.h b/src/support/filesystem_context.h
index f3875a3..c00fe29 100644
--- a/src/support/filesystem_context.h
+++ b/src/support/filesystem_context.h
@@ -4,7 +4,7 @@
#include <xalanc/XalanDOM/XalanDOMString.hpp>
#include <xalanc/XPath/Function.hpp>
-#include "boost/filesystem.hpp"
+#include <boost/filesystem.hpp>
#include <string>
#include <functional>
diff --git a/src/support/include_entity_resolver.cc b/src/support/include_entity_resolver.cc
index deac1d5..197b217 100644
--- a/src/support/include_entity_resolver.cc
+++ b/src/support/include_entity_resolver.cc
@@ -2,7 +2,7 @@
#include <xercesc/framework/LocalFileInputSource.hpp>
-#include "boost/filesystem.hpp"
+#include <boost/filesystem.hpp>
#include "support/xalan_string.h"
#include "support/xerces_string_guard.h"
diff --git a/src/support/include_entity_resolver.h b/src/support/include_entity_resolver.h
index ea5fb7a..e7c5542 100644
--- a/src/support/include_entity_resolver.h
+++ b/src/support/include_entity_resolver.h
@@ -4,7 +4,7 @@
#include <xercesc/sax/EntityResolver.hpp>
#include <xercesc/sax/InputSource.hpp>
-#include "boost/optional.hpp"
+#include <boost/optional.hpp>
#include <string>
#include <vector>
diff --git a/src/support/type/filter.h b/src/support/type/filter.h
new file mode 100644
index 0000000..4a0e19f
--- /dev/null
+++ b/src/support/type/filter.h
@@ -0,0 +1,24 @@
+#ifndef INPUTXSLT_SRC_SUPPORT_TYPE_FILTER_H_
+#define INPUTXSLT_SRC_SUPPORT_TYPE_FILTER_H_
+
+#include <tuple>
+#include <type_traits>
+
+namespace InputXSLT {
+
+template <
+ typename BaseReference,
+ typename Head,
+ typename... Tail
+>
+struct filter_derived {
+ typedef typename std::conditional<
+ std::is_base_of<BaseReference, Head>::value,
+ std::tuple<Head, Tail...>,
+ std::tuple<Tail...>
+ >::type type;
+};
+
+}
+
+#endif // INPUTXSLT_SRC_SUPPORT_TYPE_FILTER_H_
diff --git a/src/support/type/xobject_value.cc b/src/support/type/xobject_value.cc
index 9bb6648..e457a69 100644
--- a/src/support/type/xobject_value.cc
+++ b/src/support/type/xobject_value.cc
@@ -4,7 +4,8 @@
#include <xalanc/XalanDOM/XalanDocumentFragment.hpp>
#include <boost/algorithm/string.hpp>
-#include "boost/filesystem.hpp"
+#include <boost/filesystem.hpp>
+#include <boost/optional.hpp>
#include <string>
@@ -27,6 +28,16 @@ std::string XObjectValue::get<std::string>(
}
template <>
+boost::optional<std::string> XObjectValue::get<boost::optional<std::string>>(
+ const xalan::XObjectPtr& ptr) const {
+ if ( ptr.null() ) {
+ return boost::optional<std::string>();
+ } else {
+ return this->get<std::string>(ptr);
+ }
+}
+
+template <>
boost::filesystem::path XObjectValue::get<boost::filesystem::path>(
const xalan::XObjectPtr& ptr) const {
const std::string rawPath(