From ee4eb695119bce96515b330f9fc83ddd67da5c62 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Dec 2009 12:26:05 +0200 Subject: Implement de-registering polymorphic type information This is required for DLL/shared library unloading. --- libxsd/xsd/cxx/tree/type-serializer-map.hxx | 30 +++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'libxsd/xsd/cxx/tree/type-serializer-map.hxx') diff --git a/libxsd/xsd/cxx/tree/type-serializer-map.hxx b/libxsd/xsd/cxx/tree/type-serializer-map.hxx index b1ca479..8c7bfca 100644 --- a/libxsd/xsd/cxx/tree/type-serializer-map.hxx +++ b/libxsd/xsd/cxx/tree/type-serializer-map.hxx @@ -38,11 +38,17 @@ namespace xsd bool override = true); void + unregister_type (const type_id&); + + void register_element (const qualified_name& root, const qualified_name& subst, const type_id&, serializer); + void + unregister_element (const qualified_name& root, const type_id&); + public: void serialize (const C* name, // element name @@ -196,17 +202,29 @@ namespace xsd serializer_impl (xercesc::DOMElement&, const type&); + // + // template struct type_serializer_initializer { - // Register type. - // type_serializer_initializer (const C* name, const C* ns); + ~type_serializer_initializer (); + }; - // Register element. - // - type_serializer_initializer (const C* root_name, const C* root_ns, - const C* subst_name, const C* subst_ns); + + // + // + template + struct element_serializer_initializer + { + element_serializer_initializer (const C* root_name, const C* root_ns, + const C* subst_name, const C* subst_ns); + + ~element_serializer_initializer (); + + private: + const C* root_name_; + const C* root_ns_; }; } } -- cgit v1.1