Code

Super duper mega (fun!) commit: replaced encoding=utf-8 with fileencoding=utf-8 in...
[inkscape.git] / src / xml / simple-document.h
index 11d0ef4a246e6ffb6e55ffbc079b9777a3ce0752..8a37c577c6f67f417945d2a70ffe0741c72dc94d 100644 (file)
@@ -30,15 +30,11 @@ class SimpleDocument : public SimpleNode,
 {
 public:
     explicit SimpleDocument()
-    : SimpleNode(g_quark_from_static_string("xml")), _in_transaction(false)
-    {
-        _initBindings();
-    }
+    : SimpleNode(g_quark_from_static_string("xml"), this),
+      _in_transaction(false) {}
 
     NodeType type() const { return Inkscape::XML::DOCUMENT_NODE; }
 
-    NodeObserver *logger() { return this; }
-
     bool inTransaction() { return _in_transaction; }
 
     void beginTransaction();
@@ -49,6 +45,7 @@ public:
     Node *createElement(char const *name);
     Node *createTextNode(char const *content);
     Node *createComment(char const *content);
+    Node *createPI(char const *target, char const *content);
 
     void notifyChildAdded(Node &parent, Node &child, Node *prev);
 
@@ -68,16 +65,15 @@ public:
 protected:
     SimpleDocument(SimpleDocument const &doc)
     : Node(), SimpleNode(doc), Document(), NodeObserver(),
-      _in_transaction(false)
+      _in_transaction(false) {}
+
+    SimpleNode *_duplicate(Document* /*doc*/) const
     {
-        _initBindings();
+        return new SimpleDocument(*this);
     }
-
-    SimpleNode *_duplicate() const { return new SimpleDocument(*this); }
+    NodeObserver *logger() { return this; }
 
 private:
-    void _initBindings();
-
     bool _in_transaction;
     LogBuilder _log_builder;
 };
@@ -96,4 +92,4 @@ private:
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :