diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-12-18 18:48:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-01-13 22:32:43 +0300 |
commit | 2615896faa646e5830abf2c269150e1165c66515 (patch) | |
tree | 7d95978ec0a83094c9462ed4e1f59d42f4ff8ddb /libxsd/libxsd/cxx/xml/bits | |
parent | 7420f85ea19b0562ffdd8123442f32bc8bac1267 (diff) |
Switch to build2
Diffstat (limited to 'libxsd/libxsd/cxx/xml/bits')
-rw-r--r-- | libxsd/libxsd/cxx/xml/bits/literals.hxx | 81 | ||||
-rw-r--r-- | libxsd/libxsd/cxx/xml/bits/literals.ixx | 259 |
2 files changed, 340 insertions, 0 deletions
diff --git a/libxsd/libxsd/cxx/xml/bits/literals.hxx b/libxsd/libxsd/cxx/xml/bits/literals.hxx new file mode 100644 index 0000000..cc100af --- /dev/null +++ b/libxsd/libxsd/cxx/xml/bits/literals.hxx @@ -0,0 +1,81 @@ +// file : libxsd/cxx/xml/bits/literals.hxx +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef LIBXSD_CXX_XML_BITS_LITERALS_HXX +#define LIBXSD_CXX_XML_BITS_LITERALS_HXX + +namespace xsd +{ + namespace cxx + { + namespace xml + { + namespace bits + { + template <typename C> + const C* + xml_prefix (); + + template <typename C> + const C* + xml_namespace (); + + template <typename C> + const C* + xmlns_prefix (); + + template <typename C> + const C* + xmlns_namespace (); + + template <typename C> + const C* + xsi_prefix (); + + template <typename C> + const C* + xsi_namespace (); + + template <typename C> + const C* + type (); + + template <typename C> + const C* + nil_lit (); + + template <typename C> + const C* + schema_location (); + + template <typename C> + const C* + no_namespace_schema_location (); + + template <typename C> + const C* + first_prefix (); + + template <typename C> + const C* + second_prefix (); + + template <typename C> + const C* + third_prefix (); + + template <typename C> + const C* + fourth_prefix (); + + template <typename C> + const C* + fifth_prefix (); + } + } + } +} + +#endif // LIBXSD_CXX_XML_BITS_LITERALS_HXX + +#include <libxsd/cxx/xml/bits/literals.ixx> diff --git a/libxsd/libxsd/cxx/xml/bits/literals.ixx b/libxsd/libxsd/cxx/xml/bits/literals.ixx new file mode 100644 index 0000000..f09d9f2 --- /dev/null +++ b/libxsd/libxsd/cxx/xml/bits/literals.ixx @@ -0,0 +1,259 @@ +// file : libxsd/cxx/xml/bits/literals.ixx +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSD_CXX_XML_BITS_LITERALS_IXX +#define XSD_CXX_XML_BITS_LITERALS_IXX + +#endif // XSD_CXX_XML_BITS_LITERALS_IXX + + +#if defined(XSD_USE_CHAR) || !defined(XSD_USE_WCHAR) + +#ifndef XSD_CXX_XML_BITS_LITERALS_IXX_CHAR +#define XSD_CXX_XML_BITS_LITERALS_IXX_CHAR + +namespace xsd +{ + namespace cxx + { + namespace xml + { + namespace bits + { + template <> + inline const char* + xml_prefix<char> () + { + return "xml"; + } + + template <> + inline const char* + xml_namespace<char> () + { + return "http://www.w3.org/XML/1998/namespace"; + } + + template <> + inline const char* + xmlns_prefix<char> () + { + return "xmlns"; + } + + template <> + inline const char* + xmlns_namespace<char> () + { + return "http://www.w3.org/2000/xmlns/"; + } + + template <> + inline const char* + xsi_prefix<char> () + { + return "xsi"; + } + + template <> + inline const char* + xsi_namespace<char> () + { + return "http://www.w3.org/2001/XMLSchema-instance"; + } + + template <> + inline const char* + type<char> () + { + return "type"; + } + + template <> + inline const char* + nil_lit<char> () + { + return "nil"; + } + + template <> + inline const char* + schema_location<char> () + { + return "schemaLocation"; + } + + template <> + inline const char* + no_namespace_schema_location<char> () + { + return "noNamespaceSchemaLocation"; + } + + template <> + inline const char* + first_prefix<char> () + { + return "p1"; + } + + template <> + inline const char* + second_prefix<char> () + { + return "p2"; + } + + template <> + inline const char* + third_prefix<char> () + { + return "p3"; + } + + template <> + inline const char* + fourth_prefix<char> () + { + return "p4"; + } + + template <> + inline const char* + fifth_prefix<char> () + { + return "p5"; + } + } + } + } +} + +#endif // XSD_CXX_XML_BITS_LITERALS_IXX_CHAR +#endif // XSD_USE_CHAR + + +#if defined(XSD_USE_WCHAR) || !defined(XSD_USE_CHAR) + +#ifndef XSD_CXX_XML_BITS_LITERALS_IXX_WCHAR +#define XSD_CXX_XML_BITS_LITERALS_IXX_WCHAR + +namespace xsd +{ + namespace cxx + { + namespace xml + { + namespace bits + { + template <> + inline const wchar_t* + xml_prefix<wchar_t> () + { + return L"xml"; + } + + template <> + inline const wchar_t* + xml_namespace<wchar_t> () + { + return L"http://www.w3.org/XML/1998/namespace"; + } + + template <> + inline const wchar_t* + xmlns_prefix<wchar_t> () + { + return L"xmlns"; + } + + template <> + inline const wchar_t* + xmlns_namespace<wchar_t> () + { + return L"http://www.w3.org/2000/xmlns/"; + } + + template <> + inline const wchar_t* + xsi_prefix<wchar_t> () + { + return L"xsi"; + } + + template <> + inline const wchar_t* + xsi_namespace<wchar_t> () + { + return L"http://www.w3.org/2001/XMLSchema-instance"; + } + + template <> + inline const wchar_t* + type<wchar_t> () + { + return L"type"; + } + + template <> + inline const wchar_t* + nil_lit<wchar_t> () + { + return L"nil"; + } + + template <> + inline const wchar_t* + schema_location<wchar_t> () + { + return L"schemaLocation"; + } + + template <> + inline const wchar_t* + no_namespace_schema_location<wchar_t> () + { + return L"noNamespaceSchemaLocation"; + } + + template <> + inline const wchar_t* + first_prefix<wchar_t> () + { + return L"p1"; + } + + template <> + inline const wchar_t* + second_prefix<wchar_t> () + { + return L"p2"; + } + + template <> + inline const wchar_t* + third_prefix<wchar_t> () + { + return L"p3"; + } + + template <> + inline const wchar_t* + fourth_prefix<wchar_t> () + { + return L"p4"; + } + + template <> + inline const wchar_t* + fifth_prefix<wchar_t> () + { + return L"p5"; + } + } + } + } +} + +#endif // XSD_CXX_XML_BITS_LITERALS_IXX_WCHAR +#endif // XSD_USE_WCHAR |