diff options
Diffstat (limited to 'xsd/libxsd/xsd/cxx/tree/type-factory-map.txx')
-rw-r--r-- | xsd/libxsd/xsd/cxx/tree/type-factory-map.txx | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/xsd/libxsd/xsd/cxx/tree/type-factory-map.txx b/xsd/libxsd/xsd/cxx/tree/type-factory-map.txx index b9e0a06..e1fe0cc 100644 --- a/xsd/libxsd/xsd/cxx/tree/type-factory-map.txx +++ b/xsd/libxsd/xsd/cxx/tree/type-factory-map.txx @@ -1,6 +1,5 @@ // file : xsd/cxx/tree/type-factory-map.txx -// author : Boris Kolpackov <boris@codesynthesis.com> -// copyright : Copyright (c) 2005-2010 Code Synthesis Tools CC +// copyright : Copyright (c) 2005-2014 Code Synthesis Tools CC // license : GNU GPL v2 + exceptions; see accompanying LICENSE file #include <xercesc/validators/schema/SchemaSymbols.hpp> @@ -38,7 +37,7 @@ namespace xsd &factory_impl<type>, false); - typedef simple_type<type> simple_type; + typedef simple_type<C, type> simple_type; register_type ( qualified_name (bits::any_simple_type<C> (), xsd), &factory_impl<simple_type>, @@ -226,9 +225,9 @@ namespace xsd void type_factory_map<C>:: register_type (const qualified_name& name, factory f, - bool override) + bool replace) { - if (override || type_map_.find (name) == type_map_.end ()) + if (replace || type_map_.find (name) == type_map_.end ()) type_map_[name] = f; } @@ -273,7 +272,7 @@ namespace xsd } template <typename C> - std::auto_ptr<type> type_factory_map<C>:: + XSD_AUTO_PTR<type> type_factory_map<C>:: create (const C* name, const C* ns, factory static_type, @@ -307,7 +306,7 @@ namespace xsd } if (f == 0) - return std::auto_ptr<type> (0); // No match. + return XSD_AUTO_PTR<type> (); // No match. // Check for xsi:type // @@ -326,11 +325,10 @@ namespace xsd template <typename C> template <typename T> - std::auto_ptr<type> type_factory_map<C>:: + XSD_AUTO_PTR<type> type_factory_map<C>:: traits_adapter (const xercesc::DOMElement& e, flags f, container* c) { - std::auto_ptr<T> r (traits<T, C>::create (e, f, c)); - return std::auto_ptr<type> (r.release ()); + return XSD_AUTO_PTR<type> (traits<T, C>::create (e, f, c)); } template <typename C> @@ -428,10 +426,10 @@ namespace xsd // // template<typename T> - std::auto_ptr<type> + XSD_AUTO_PTR<type> factory_impl (const xercesc::DOMElement& e, flags f, container* c) { - return std::auto_ptr<type> (new T (e, f, c)); + return XSD_AUTO_PTR<type> (new T (e, f, c)); } // |