diff options
Diffstat (limited to 'src/support/dom/document_cache.h')
-rw-r--r-- | src/support/dom/document_cache.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/support/dom/document_cache.h b/src/support/dom/document_cache.h index 1f9a9e3..3aeb332 100644 --- a/src/support/dom/document_cache.h +++ b/src/support/dom/document_cache.h @@ -14,10 +14,23 @@ namespace InputXSLT { class DomDocumentCache { + class document_deleter { + friend std::unique_ptr<xercesc::DOMDocument, document_deleter>; + + void operator()(xercesc::DOMDocument*); + }; + public: + typedef std::unique_ptr< + xercesc::DOMDocument, + document_deleter + > document_ptr; + + static document_ptr createDocument(); + DomDocumentCache(); - xalan::XalanDocument* create(xercesc::DOMDocument*); + xalan::XalanDocument* create(document_ptr&&); private: class item; |