summaryrefslogtreecommitdiffstats
path: root/src/xml/pi-node.h
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2008-03-07 22:18:56 +0000
committermental <mental@users.sourceforge.net>2008-03-07 22:18:56 +0000
commit31acc450aa0320ab82f5075adf8afbcae0763e6d (patch)
treeef45a9eeb5a7baa754176307396a2837bca879e0 /src/xml/pi-node.h
parentFix #include (diff)
downloadinkscape-31acc450aa0320ab82f5075adf8afbcae0763e6d.tar.gz
inkscape-31acc450aa0320ab82f5075adf8afbcae0763e6d.zip
add basic support for preserving processing instructions in the AST
(bzr r4987)
Diffstat (limited to 'src/xml/pi-node.h')
-rw-r--r--src/xml/pi-node.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/xml/pi-node.h b/src/xml/pi-node.h
new file mode 100644
index 000000000..c3f84b636
--- /dev/null
+++ b/src/xml/pi-node.h
@@ -0,0 +1,52 @@
+/*
+ * Inkscape::XML::PINode - simple XML comment implementation
+ *
+ * Copyright 2004-2005 MenTaLguY <mental@rydia.net>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * See the file COPYING for details.
+ *
+ */
+
+#ifndef SEEN_INKSCAPE_XML_PI_NODE_H
+#define SEEN_INKSCAPE_XML_PI_NODE_H
+
+#include <glib/gquark.h>
+#include "xml/simple-node.h"
+
+namespace Inkscape {
+
+namespace XML {
+
+struct PINode : public SimpleNode {
+ explicit PINode(GQuark target, Util::ptr_shared<char> content)
+ : SimpleNode(target)
+ {
+ setContent(content);
+ }
+
+ Inkscape::XML::NodeType type() const { return Inkscape::XML::PI_NODE; }
+
+protected:
+ SimpleNode *_duplicate(Document* doc) const { return new PINode(*this); }
+};
+
+}
+
+}
+
+#endif
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :