From 5a54b5b8150d8bf1ac5db3ac688479b3aca6486d Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 23 Aug 2014 00:19:09 +0200 Subject: 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" specialization to the XObjectValue class * modified test cases accordingly * modified README.md accordingly --- src/support/type/xobject_value.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/support/type') 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 @@ -51,6 +51,17 @@ boost::filesystem::path XObjectValue::get( } } +template <> +boost::optional +XObjectValue::get>( + const xalan::XObjectPtr& ptr) const { + if ( ptr.null() ) { + return boost::optional(); + } else { + return this->get(ptr); + } +} + template <> xalan::XObjectPtr XObjectValue::get( const xalan::XObjectPtr& ptr) const { -- cgit v1.2.3