aboutsummaryrefslogtreecommitdiff
path: root/src/support
diff options
context:
space:
mode:
authorAdrian Kummerlaender2014-08-23 00:19:09 +0200
committerAdrian Kummerlaender2014-08-23 00:19:09 +0200
commit5a54b5b8150d8bf1ac5db3ac688479b3aca6486d (patch)
tree08fe4ce82a6f0da1837504afaf9c0d27affa5513 /src/support
parent2c89112141530617b51af8c41211c2507ec8c738 (diff)
downloadInputXSLT-5a54b5b8150d8bf1ac5db3ac688479b3aca6486d.tar
InputXSLT-5a54b5b8150d8bf1ac5db3ac688479b3aca6486d.tar.gz
InputXSLT-5a54b5b8150d8bf1ac5db3ac688479b3aca6486d.tar.bz2
InputXSLT-5a54b5b8150d8bf1ac5db3ac688479b3aca6486d.tar.lz
InputXSLT-5a54b5b8150d8bf1ac5db3ac688479b3aca6486d.tar.xz
InputXSLT-5a54b5b8150d8bf1ac5db3ac688479b3aca6486d.tar.zst
InputXSLT-5a54b5b8150d8bf1ac5db3ac688479b3aca6486d.zip
Replaced FunctionTransform by making the target of FunctionGenerate optional
* if the target parameter is not provided FunctionGenerate now performs exactly the same functionality as FunctionTransform * added "boost::optional<boost::filesystem::path>" specialization to the XObjectValue class * modified test cases accordingly * modified README.md accordingly
Diffstat (limited to 'src/support')
-rw-r--r--src/support/type/xobject_value.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/support/type/xobject_value.cc b/src/support/type/xobject_value.cc
index 2fe4f9f..959da94 100644
--- a/src/support/type/xobject_value.cc
+++ b/src/support/type/xobject_value.cc
@@ -52,6 +52,17 @@ boost::filesystem::path XObjectValue::get<boost::filesystem::path>(
}
template <>
+boost::optional<boost::filesystem::path>
+XObjectValue::get<boost::optional<boost::filesystem::path>>(
+ const xalan::XObjectPtr& ptr) const {
+ if ( ptr.null() ) {
+ return boost::optional<boost::filesystem::path>();
+ } else {
+ return this->get<boost::filesystem::path>(ptr);
+ }
+}
+
+template <>
xalan::XObjectPtr XObjectValue::get<xalan::XObjectPtr>(
const xalan::XObjectPtr& ptr) const {
return ptr;