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/type-factory-map.txx | 481 ++++++++++++++++++++++++++++ 1 file changed, 481 insertions(+) create mode 100644 libxsd/libxsd/cxx/tree/type-factory-map.txx (limited to 'libxsd/libxsd/cxx/tree/type-factory-map.txx') diff --git a/libxsd/libxsd/cxx/tree/type-factory-map.txx b/libxsd/libxsd/cxx/tree/type-factory-map.txx new file mode 100644 index 0000000..a1d8c5e --- /dev/null +++ b/libxsd/libxsd/cxx/tree/type-factory-map.txx @@ -0,0 +1,481 @@ +// file : libxsd/cxx/tree/type-factory-map.txx +// license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +#include + +#include // xml::{string, transcode} +#include // xml::{prefix, uq_name} +#include // xml::bits::{xml_namespace, etc} + +#include +#include + +namespace xsd +{ + namespace cxx + { + namespace tree + { + // type_factory_map + // + template + type_factory_map:: + type_factory_map () + { + // Register factories for default instantiations of built-in, + // non-fundamental types. + // + + std::basic_string xsd (bits::xml_schema ()); + + + // anyType and anySimpleType. + // + register_type ( + qualified_name (bits::any_type (), xsd), + &factory_impl, + false); + + typedef simple_type simple_type; + register_type ( + qualified_name (bits::any_simple_type (), xsd), + &factory_impl, + false); + + + // Strings + // + typedef string string; + register_type ( + qualified_name (bits::string (), xsd), + &factory_impl, + false); + + typedef normalized_string normalized_string; + register_type ( + qualified_name (bits::normalized_string (), xsd), + &factory_impl, + false); + + typedef token token; + register_type ( + qualified_name (bits::token (), xsd), + &factory_impl, + false); + + typedef name name; + register_type ( + qualified_name (bits::name (), xsd), + &factory_impl, + false); + + typedef nmtoken nmtoken; + register_type ( + qualified_name (bits::nmtoken (), xsd), + &factory_impl, + false); + + typedef nmtokens nmtokens; + register_type ( + qualified_name (bits::nmtokens (), xsd), + &factory_impl, + false); + + typedef ncname ncname; + register_type ( + qualified_name (bits::ncname (), xsd), + &factory_impl, + false); + + typedef language language; + register_type ( + qualified_name (bits::language (), xsd), + &factory_impl, + false); + + + // ID/IDREF. + // + typedef id id; + register_type ( + qualified_name (bits::id (), xsd), + &factory_impl, + false); + + typedef idref idref; + register_type ( + qualified_name (bits::idref (), xsd), + &factory_impl, + false); + + typedef idrefs idrefs; + register_type ( + qualified_name (bits::idrefs (), xsd), + &factory_impl, + false); + + + // URI. + // + typedef uri uri; + register_type ( + qualified_name (bits::any_uri (), xsd), + &factory_impl, + false); + + + // Qualified name. + // + typedef qname qname; + register_type ( + qualified_name (bits::qname (), xsd), + &factory_impl, + false); + + + // Binary. + // + typedef base64_binary base64_binary; + register_type ( + qualified_name (bits::base64_binary (), xsd), + &factory_impl, + false); + + typedef hex_binary hex_binary; + register_type ( + qualified_name (bits::hex_binary (), xsd), + &factory_impl, + false); + + + // Date/time. + // + typedef gday gday; + register_type ( + qualified_name (bits::gday (), xsd), + &factory_impl, + false); + + typedef gmonth gmonth; + register_type ( + qualified_name (bits::gmonth (), xsd), + &factory_impl, + false); + + typedef gyear gyear; + register_type ( + qualified_name (bits::gyear (), xsd), + &factory_impl, + false); + + typedef gmonth_day gmonth_day; + register_type ( + qualified_name (bits::gmonth_day (), xsd), + &factory_impl, + false); + + typedef gyear_month gyear_month; + register_type ( + qualified_name (bits::gyear_month (), xsd), + &factory_impl, + false); + + typedef date date; + register_type ( + qualified_name (bits::date (), xsd), + &factory_impl, + false); + + typedef time time; + register_type ( + qualified_name (bits::time (), xsd), + &factory_impl