[libxml++] Document: Make the Document(xmlDoc*) constructor protected.



commit 4a71a9a74affadbc4a6f779f3fa86ca0e30e7a35
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Jan 30 11:05:16 2012 +0100

    Document: Make the Document(xmlDoc*) constructor protected.
    
    * libxml++/document.h: This was requested in bug #668980 (A. Pignotti).

 ChangeLog           |    6 ++++++
 libxml++/document.h |    8 ++++++--
 2 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a40418d..85b52a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-01-30  Murray Cumming  <murrayc murrayc com>
+
+	Document: Make the Document(xmlDoc*) constructor protected.
+
+	* libxml++/document.h: This was requested in bug #668980 (A. Pignotti).
+
 2011-09-09  Murray Cumming  <murrayc murrayc com>
 
 	Document: write_to_*(): Make sure that we write UTF-8 out.
diff --git a/libxml++/document.h b/libxml++/document.h
index c30068c..d8a66fb 100644
--- a/libxml++/document.h
+++ b/libxml++/document.h
@@ -41,7 +41,7 @@ class Document;
 
 //TODO: Make Document inherit from Node, when we can break ABI one day?
 //
-//libxml might intend xmlDox to derive (theoretically) from xmlNode.
+//libxml might intend xmlDoc to derive (theoretically) from xmlNode.
 //This is suggested because the XmlNodeSet returned by xmlXPathEval (see the Node::find() implementation) can contain either xmlNode or xmlDocument elements.
 /**
  * Represents an XML document in the DOM model.
@@ -61,6 +61,11 @@ class Document : NonCopyable
 
 public:
   explicit Document(const Glib::ustring& version = "1.0");
+  
+protected:
+  Document(_xmlDoc* doc);
+    
+public:
   virtual ~Document();
 
   /** @return The encoding used in the source from which the document has been loaded.
@@ -185,7 +190,6 @@ private:
 
   static Init init_;
 
-  Document(_xmlDoc* doc);
   _xmlDoc* impl_;
 };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]