From 2615896faa646e5830abf2c269150e1165c66515 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 18 Dec 2020 18:48:46 +0300 Subject: Switch to build2 --- libxsd/libxsd/cxx/tree/bits/literals.ixx | 874 +++++++++++++++++++++++++++++++ 1 file changed, 874 insertions(+) create mode 100644 libxsd/libxsd/cxx/tree/bits/literals.ixx (limited to 'libxsd/libxsd/cxx/tree/bits/literals.ixx') diff --git a/libxsd/libxsd/cxx/tree/bits/literals.ixx b/libxsd/libxsd/cxx/tree/bits/literals.ixx new file mode 100644 index 0000000..8c2434b --- /dev/null +++ b/libxsd/libxsd/cxx/tree/bits/literals.ixx @@ -0,0 +1,874 @@ +// file : libxsd/cxx/tree/bits/literals.ixx +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX +#define XSD_CXX_TREE_BITS_LITERALS_IXX + +// The char versions of the following literals are required even +// if we are using wchar_t as the character type. +// +namespace xsd +{ + namespace cxx + { + namespace tree + { + namespace bits + { + // + // + template<> + inline const char* + positive_inf () + { + return "INF"; + } + + template<> + inline const char* + negative_inf () + { + return "-INF"; + } + + template<> + inline const char* + nan () + { + return "NaN"; + } + } + } + } +} + +#endif // XSD_CXX_TREE_BITS_LITERALS_IXX + + +#if defined(XSD_CXX_TREE_USE_CHAR) || !defined(XSD_CXX_TREE_USE_WCHAR) + +#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR +#define XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR + +namespace xsd +{ + namespace cxx + { + namespace tree + { + namespace bits + { + // + // + template<> + inline const char* + true_ () + { + return "true"; + } + + template<> + inline const char* + one () + { + return "1"; + } + + // + // + template<> + inline const char* + not_present () + { + return ""; + } + + // + // + template <> + inline const char* + xml_schema () + { + return "http://www.w3.org/2001/XMLSchema"; + } + + // + // + template <> + inline const char* + any_type () + { + return "anyType"; + } + + template <> + inline const char* + any_simple_type () + { + return "anySimpleType"; + } + + template <> + inline const char* + string () + { + return "string"; + } + + template <> + inline const char* + normalized_string () + { + return "normalizedString"; + } + + template <> + inline const char* + token () + { + return "token"; + } + + template <> + inline const char* + name () + { + return "Name"; + } + + template <> + inline const char* + nmtoken () + { + return "NMTOKEN"; + } + + template <> + inline const char* + nmtokens () + { + return "NMTOKENS"; + } + + template <> + inline const char* + ncname () + { + return "NCName"; + } + + template <> + inline const char* + language () + { + return "language"; + } + + + template <> + inline const char* + id () + { + return "ID"; + } + + template <> + inline const char* + idref () + { + return "IDREF"; + } + + template <> + inline const char* + idrefs () + { + return "IDREFS"; + } + + template <> + inline const char* + any_uri () + { + return "anyURI"; + } + + template <> + inline const char* + qname () + { + return "QName"; + } + + template <> + inline const char* + base64_binary () + { + return "base64Binary"; + } + + template <> + inline const char* + hex_binary () + { + return "hexBinary"; + } + + template <> + inline const char* + date () + { + return "date"; + } + + template <> + inline const char* + date_time () + { + return "dateTime"; + } + + template <> + inline const char* + duration () + { + return "duration"; + } + + template <> + inline const char* + gday () + { + return "gDay"; + } + + template <> + inline const char* + gmonth () + { + return "gMonth"; + } + + template <> + inline const char* + gmonth_day () + { + return "gMonthDay"; + } + + template <> + inline const char* + gyear () + { + return "gYear"; + } + + template <> + inline const char* + gyear_month () + { + return "gYearMonth"; + } + + template <> + inline const char* + time () + { + return "time"; + } + + template <> + inline const char* + entity () + { + return "ENTITY"; + } + + template <> + inline const char* + entities () + { + return "ENTITIES"; + } + + template <> + inline const char* + gday_prefix () + { + return "---"; + } + + template <> + inline const char* + gmonth_prefix () + { + return "--"; + } + + // + // + template <> + inline const char* + ex_error_error () + { + return " error: "; + } + + template <> + inline const char* + ex_error_warning () + { + return " warning: "; + } + + template <> + inline const char* + ex_parsing_msg () + { + return "instance document parsing failed"; + } + + template <> + inline const char* + ex_eel_expected () + { + return "expected element '"; + } + + template <> + inline const char* + ex_uel_expected () + { + return "expected element '"; + } + + template <> + inline const char* + ex_uel_instead () + { + return "' instead of '"; + } + + template <> + inline const char* + ex_uel_unexpected () + { + return "unexpected element '"; + } + + template <> + inline const char* + ex_eat_expected () + { + return "expected attribute '"; + } + + template <> + inline const char* + ex_uen_unexpected () + { + return "unexpected enumerator '"; + } + + template <> + inline const char* + ex_etc_msg () + { + return "expected text content"; + } + + template <> + inline const char* + ex_nti_no_type_info () + { + return "no type information available for type '"; + } + + template <> + inline const char* + ex_nei_no_element_info () + { + return "no parsing or serialization information available for " + "element '"; + } + template <> + inline const char* + ex_nd_type () + { + return "type '"; + } + + template <> + inline const char* + ex_nd_not_derived () + { + return "' is not derived from '"; + } + + template <> + inline const char* + ex_di_id () + { + return "ID '"; + } + + template <> + inline const char* + ex_di_already_exist () + { + return "' already exist"; + } + + template <> + inline const char* + ex_serialization_msg () + { + return "serialization failed"; + } + + template <> + inline const char* + ex_npm_no_mapping () + { + return "no mapping provided for namespace prefix '"; + } + + template <> + inline const char* + ex_bounds_msg () + { + return "buffer boundary rules have been violated"; + } + } + } + } +} + +#endif // XSD_CXX_TREE_BITS_LITERALS_IXX_CHAR +#endif // XSD_CXX_TREE_USE_CHAR + + +#if defined(XSD_CXX_TREE_USE_WCHAR) || !defined(XSD_CXX_TREE_USE_CHAR) + +#ifndef XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR +#define XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR + +namespace xsd +{ + namespace cxx + { + namespace tree + { + namespace bits + { + // + // + template<> + inline const wchar_t* + true_ () + { + return L"true"; + } + + template<> + inline const wchar_t* + one () + { + return L"1"; + } + + // + // + template<> + inline const wchar_t* + positive_inf () + { + return L"INF"; + } + + template<> + inline const wchar_t* + negative_inf () + { + return L"-INF"; + } + + template<> + inline const wchar_t* + nan () + { + return L"NaN"; + } + + // + // + template<> + inline const wchar_t* + not_present () + { + return L""; + } + + // + // + template <> + inline const wchar_t* + xml_schema () + { + return L"http://www.w3.org/2001/XMLSchema"; + } + + // + // + template <> + inline const wchar_t* + any_type () + { + return L"anyType"; + } + + template <> + inline const wchar_t* + any_simple_type () + { + return L"anySimpleType"; + } + + template <> + inline const wchar_t* + string () + { + return L"string"; + } + + template <> + inline const wchar_t* + normalized_string () + { + return L"normalizedString"; + } + + template <> + inline const wchar_t* + token () + { + return L"token"; + } + + template <> + inline const wchar_t* + name () + { + return L"Name"; + } + + template <> + inline const wchar_t* + nmtoken () + { + return L"NMTOKEN"; + } + + template <> + inline const wchar_t* + nmtokens () + { + return L"NMTOKENS"; + } + + template <> + inline const wchar_t* + ncname () + { + return L"NCName"; + } + + template <> + inline const wchar_t* + language () + { + return L"language"; + } + + + template <> + inline const wchar_t* + id () + { + return L"ID"; + } + + template <> + inline const wchar_t* + idref () + { + return L"IDREF"; + } + + template <> + inline const wchar_t* + idrefs () + { + return L"IDREFS"; + } + + template <> + inline const wchar_t* + any_uri () + { + return L"anyURI"; + } + + template <> + inline const wchar_t* + qname () + { + return L"QName"; + } + + template <> + inline const wchar_t* + base64_binary () + { + return L"base64Binary"; + } + + template <> + inline const wchar_t* + hex_binary () + { + return L"hexBinary"; + } + + template <> + inline const wchar_t* + date () + { + return L"date"; + } + + template <> + inline const wchar_t* + date_time () + { + return L"dateTime"; + } + + template <> + inline const wchar_t* + duration () + { + return L"duration"; + } + + template <> + inline const wchar_t* + gday () + { + return L"gDay"; + } + + template <> + inline const wchar_t* + gmonth () + { + return L"gMonth"; + } + + template <> + inline const wchar_t* + gmonth_day () + { + return L"gMonthDay"; + } + + template <> + inline const wchar_t* + gyear () + { + return L"gYear"; + } + + template <> + inline const wchar_t* + gyear_month () + { + return L"gYearMonth"; + } + + template <> + inline const wchar_t* + time () + { + return L"time"; + } + + template <> + inline const wchar_t* + entity () + { + return L"ENTITY"; + } + + template <> + inline const wchar_t* + entities () + { + return L"ENTITIES"; + } + + template <> + inline const wchar_t* + gday_prefix () + { + return L"---"; + } + + template <> + inline const wchar_t* + gmonth_prefix () + { + return L"--"; + } + + // + // + template <> + inline const wchar_t* + ex_error_error () + { + return L" error: "; + } + + template <> + inline const wchar_t* + ex_error_warning () + { + return L" warning: "; + } + + template <> + inline const wchar_t* + ex_parsing_msg () + { + return L"instance document parsing failed"; + } + + template <> + inline const wchar_t* + ex_eel_expected () + { + return L"expected element '"; + } + + template <> + inline const wchar_t* + ex_uel_expected () + { + return L"expected element '"; + } + + template <> + inline const wchar_t* + ex_uel_instead () + { + return L"' instead of '"; + } + + template <> + inline const wchar_t* + ex_uel_unexpected () + { + return L"unexpected element '"; + } + + template <> + inline const wchar_t* + ex_eat_expected () + { + return L"expected attribute '"; + } + + template <> + inline const wchar_t* + ex_uen_unexpected () + { + return L"unexpected enumerator '"; + } + + template <> + inline const wchar_t* + ex_etc_msg () + { + return L"expected text content"; + } + + template <> + inline const wchar_t* + ex_nti_no_type_info () + { + return L"no type information available for type '"; + } + + template <> + inline const wchar_t* + ex_nei_no_element_info () + { + return L"no parsing or serialization information available for " + L"element '"; + } + template <> + inline const wchar_t* + ex_nd_type () + { + return L"type '"; + } + + template <> + inline const wchar_t* + ex_nd_not_derived () + { + return L"' is not derived from '"; + } + + template <> + inline const wchar_t* + ex_di_id () + { + return L"ID '"; + } + + template <> + inline const wchar_t* + ex_di_already_exist () + { + return L"' already exist"; + } + + template <> + inline const wchar_t* + ex_serialization_msg () + { + return L"serialization failed"; + } + + template <> + inline const wchar_t* + ex_npm_no_mapping () + { + return L"no mapping provided for namespace prefix '"; + } + + template <> + inline const wchar_t* + ex_bounds_msg () + { + return L"buffer boundary rules have been violated"; + } + } + } + } +} + +#endif // XSD_CXX_TREE_BITS_LITERALS_IXX_WCHAR +#endif // XSD_CXX_TREE_USE_WCHAR -- cgit v1.1