diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2009-12-02 12:26:05 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2009-12-02 12:26:05 +0200 |
commit | ee4eb695119bce96515b330f9fc83ddd67da5c62 (patch) | |
tree | 817bf37d4b0f0fb89e785004c41b4c6928228f79 /libxsd/xsd/cxx/tree/type-factory-map.hxx | |
parent | c155e6925211747af9a13a5994c2f768c5048971 (diff) |
Implement de-registering polymorphic type information
This is required for DLL/shared library unloading.
Diffstat (limited to 'libxsd/xsd/cxx/tree/type-factory-map.hxx')
-rw-r--r-- | libxsd/xsd/cxx/tree/type-factory-map.hxx | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/libxsd/xsd/cxx/tree/type-factory-map.hxx b/libxsd/xsd/cxx/tree/type-factory-map.hxx index 8cf916e..e191ff7 100644 --- a/libxsd/xsd/cxx/tree/type-factory-map.hxx +++ b/libxsd/xsd/cxx/tree/type-factory-map.hxx @@ -38,10 +38,17 @@ namespace xsd bool override = 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); + std::auto_ptr<type> create (const C* name, // element name const C* ns, // element namespace @@ -133,14 +140,29 @@ namespace xsd template<unsigned long id, typename C, typename T> struct type_factory_initializer { - // Register type. - // type_factory_initializer (const C* name, const C* ns); + ~type_factory_initializer (); - // Register element. - // - type_factory_initializer (const C* root_name, const C* root_ns, - const C* subst_name, const C* subst_ns); + private: + const C* name_; + const C* ns_; + }; + + // + // + template<unsigned long id, typename C, typename T> + 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_; }; } } |