aboutsummaryrefslogtreecommitdiff
path: root/src/support/type/xobject_value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/support/type/xobject_value.cc')
-rw-r--r--src/support/type/xobject_value.cc13
1 files changed, 12 insertions, 1 deletions
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(