summaryrefslogtreecommitdiff
path: root/xsd/libxsd/xsd/cxx/tree/type-factory-map.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'xsd/libxsd/xsd/cxx/tree/type-factory-map.hxx')
-rw-r--r--xsd/libxsd/xsd/cxx/tree/type-factory-map.hxx21
1 files changed, 11 insertions, 10 deletions
diff --git a/xsd/libxsd/xsd/cxx/tree/type-factory-map.hxx b/xsd/libxsd/xsd/cxx/tree/type-factory-map.hxx
index 7e849db..b2558c7 100644
--- a/xsd/libxsd/xsd/cxx/tree/type-factory-map.hxx
+++ b/xsd/libxsd/xsd/cxx/tree/type-factory-map.hxx
@@ -1,6 +1,5 @@
// file : xsd/cxx/tree/type-factory-map.hxx
-// 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
#ifndef XSD_CXX_TREE_TYPE_FACTORY_MAP_HXX
@@ -8,11 +7,13 @@
#include <map>
#include <string>
-#include <memory> // std::auto_ptr
+#include <memory> // std::auto_ptr/unique_ptr
#include <cstddef> // std::size_t
#include <xercesc/dom/DOMElement.hpp>
+#include <xsd/cxx/config.hxx> // XSD_AUTO_PTR
+
#include <xsd/cxx/tree/elements.hxx>
#include <xsd/cxx/xml/qualified-name.hxx>
@@ -26,16 +27,16 @@ namespace xsd
struct type_factory_map
{
typedef xml::qualified_name<C> qualified_name;
- typedef std::auto_ptr<type> (*factory) (const xercesc::DOMElement&,
- flags,
- container*);
+ typedef XSD_AUTO_PTR<type> (*factory) (const xercesc::DOMElement&,
+ flags,
+ container*);
public:
type_factory_map ();
void
register_type (const qualified_name& name,
factory,
- bool override = true);
+ bool replace = true);
void
unregister_type (const qualified_name& name);
@@ -49,7 +50,7 @@ namespace xsd
unregister_element (const qualified_name& root,
const qualified_name& subst);
- std::auto_ptr<type>
+ XSD_AUTO_PTR<type>
create (const C* name, // element name
const C* ns, // element namespace
factory static_type,
@@ -66,7 +67,7 @@ namespace xsd
private:
template <typename T>
- static std::auto_ptr<type>
+ static XSD_AUTO_PTR<type>
traits_adapter (const xercesc::DOMElement&, flags, container*);
private:
@@ -132,7 +133,7 @@ namespace xsd
//
//
template<typename T>
- std::auto_ptr<type>
+ XSD_AUTO_PTR<type>
factory_impl (const xercesc::DOMElement&, flags, container*);
//