summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2021-10-26 07:21:20 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2021-10-26 07:21:20 +0200
commit06e68339a849ab955d7dab169eeb3436edf33cde (patch)
tree5ba6361c7ddb5f0d2fec3ce444540c0c42251864
parent09bfb25f9038cc06c7e4241fb0dde91affd895fa (diff)
Add base_string() accessor to xml_schema::{string,uri} mapping types
-rw-r--r--libxsd/xsd/cxx/tree/types.hxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/libxsd/xsd/cxx/tree/types.hxx b/libxsd/xsd/cxx/tree/types.hxx
index 30b2209..0790997 100644
--- a/libxsd/xsd/cxx/tree/types.hxx
+++ b/libxsd/xsd/cxx/tree/types.hxx
@@ -268,6 +268,18 @@ namespace xsd
base () = x;
return *this;
}
+
+ public:
+ /**
+ * @brief Explicitly "cast" to the base string type.
+ *
+ * @return A const reference to the instance as the base string type.
+ */
+ const std::basic_string<C>&
+ base_string () const
+ {
+ return *this;
+ }
};
/**
@@ -2877,6 +2889,18 @@ namespace xsd
return *this;
}
+ public:
+ /**
+ * @brief Explicitly "cast" to the base string type.
+ *
+ * @return A const reference to the instance as the base string type.
+ */
+ const std::basic_string<C>&
+ base_string () const
+ {
+ return *this;
+ }
+
protected:
//@cond