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/xsd/cxx/tree/type-factory-map.hxx | 173 ------------------------------- 1 file changed, 173 deletions(-) delete mode 100644 libxsd/xsd/cxx/tree/type-factory-map.hxx (limited to 'libxsd/xsd/cxx/tree/type-factory-map.hxx') diff --git a/libxsd/xsd/cxx/tree/type-factory-map.hxx b/libxsd/xsd/cxx/tree/type-factory-map.hxx deleted file mode 100644 index e20acfe..0000000 --- a/libxsd/xsd/cxx/tree/type-factory-map.hxx +++ /dev/null @@ -1,173 +0,0 @@ -// file : xsd/cxx/tree/type-factory-map.hxx -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#ifndef XSD_CXX_TREE_TYPE_FACTORY_MAP_HXX -#define XSD_CXX_TREE_TYPE_FACTORY_MAP_HXX - -#include -#include -#include // std::auto_ptr/unique_ptr -#include // std::size_t - -#include - -#include // XSD_AUTO_PTR - -#include -#include - -namespace xsd -{ - namespace cxx - { - namespace tree - { - template - struct type_factory_map - { - typedef xml::qualified_name qualified_name; - typedef XSD_AUTO_PTR (*factory) (const xercesc::DOMElement&, - flags, - container*); - public: - type_factory_map (); - - void - register_type (const qualified_name& name, - factory, - bool replace = true); - - void - unregister_type (const qualified_name& name); - - void - register_element (const qualified_name& root, - const qualified_name& subst, - factory); - - void - unregister_element (const qualified_name& root, - const qualified_name& subst); - - XSD_AUTO_PTR - create (const C* name, // element name - const C* ns, // element namespace - factory static_type, - bool global, - bool qualified, - const xercesc::DOMElement&, - const qualified_name&, - flags, - container*) const; - - public: - factory - find (const qualified_name& name) const; - - private: - template - static XSD_AUTO_PTR - traits_adapter (const xercesc::DOMElement&, flags, container*); - - private: - typedef - std::map - type_map; - - // Map of (root-element to map of (subst-element to factory)). - // - typedef - std::map - subst_map; - - typedef - std::map - element_map; - - type_map type_map_; - element_map element_map_; - - private: - factory - find_substitution (const subst_map& start, - const qualified_name& name) const; - - // The name argument is as specified in xsi:type. - // - factory - find_type (const std::basic_string& name, - const xercesc::DOMElement&) const; - }; - - - // - // - template - struct type_factory_plate - { - static type_factory_map* map; - static std::size_t count; - - type_factory_plate (); - ~type_factory_plate (); - }; - - template - type_factory_map* type_factory_plate::map = 0; - - template - std::size_t type_factory_plate::count = 0; - - - // - // - template - inline type_factory_map& - type_factory_map_instance () - { - return *type_factory_plate::map; - } - - - // - // - template - XSD_AUTO_PTR - factory_impl (const xercesc::DOMElement&, flags, container*); - - // - // - template - struct type_factory_initializer - { - type_factory_initializer (const C* name, const C* ns); - ~type_factory_initializer (); - - private: - const C* name_; - const C* ns_; - }; - - // - // - template - struct element_factory_initializer - { - element_factory_initializer (const C* root_name, const C* root_ns, - const C* subst_name, const C* subst_ns); - - ~element_factory_initializer (); - - private: - const C* root_name_; - const C* root_ns_; - const C* subst_name_; - const C* subst_ns_; - }; - } - } -} - -#include - -#endif // XSD_CXX_TREE_TYPE_FACTORY_MAP_HXX -- cgit v1.1