diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-10-26 07:21:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-10-26 07:21:20 +0200 |
commit | 06e68339a849ab955d7dab169eeb3436edf33cde (patch) | |
tree | 5ba6361c7ddb5f0d2fec3ce444540c0c42251864 /libxsd | |
parent | 09bfb25f9038cc06c7e4241fb0dde91affd895fa (diff) |
Add base_string() accessor to xml_schema::{string,uri} mapping types
Diffstat (limited to 'libxsd')
-rw-r--r-- | libxsd/xsd/cxx/tree/types.hxx | 24 |
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 |