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



commit 358ce91e1eab1a07b0ef2c8c72544d1825b0fd84
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Fri Aug 10 12:48:25 2012 +0200

    Document: Make the Document(xmlDoc*) constructor public.
    
    * libxml++/document.h: Make the Document(xmlDoc*) constructor public.
    Remove friend declarations that become unnecessary. Bug #668980.

 ChangeLog           |    7 +++++++
 libxml++/document.h |   11 ++++++-----
 2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c3a08c2..c02f485 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-08-10  Kjell Ahlstedt  <kjell ahlstedt bredband net>
+
+	Document: Make the Document(xmlDoc*) constructor public.
+
+	* libxml++/document.h: Make the Document(xmlDoc*) constructor public.
+	Remove friend declarations that become unnecessary. Bug #668980.
+
 2012-08-09  Kjell Ahlstedt  <kjell ahlstedt bredband net>
 
 	Improve the DtdValidation and SchemaValidation example programs.
diff --git a/libxml++/document.h b/libxml++/document.h
index d68675c..d2c238e 100644
--- a/libxml++/document.h
+++ b/libxml++/document.h
@@ -56,9 +56,7 @@ class Document : NonCopyable
     virtual ~Init();
   };
 
-  friend class DomParser;
   friend class SaxParser;
-  friend class Schema;
 
 public:
   /** Create a new document.
@@ -67,10 +65,13 @@ public:
    */
   explicit Document(const Glib::ustring& version = "1.0");
   
-protected:
-  Document(_xmlDoc* doc);
+  /** Create a new C++ wrapper for an xmlDoc struct.
+   * The created xmlpp::Document takes ownership of the xmlDoc.
+   * When the Document is deleted, so is the xmlDoc and all its nodes.
+   * @param doc A pointer to an xmlDoc struct. Must not be <tt>0</tt>.
+   */
+  explicit Document(_xmlDoc* doc);
     
-public:
   virtual ~Document();
 
   /** @return The encoding used in the source from which the document has been loaded.



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