1 /** @file
2 * @brief Processing instruction node implementation
3 */
4 /* Copyright 2004-2005 MenTaLguY <mental@rydia.net>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * See the file COPYING for details.
12 */
14 #ifndef SEEN_INKSCAPE_XML_PI_NODE_H
15 #define SEEN_INKSCAPE_XML_PI_NODE_H
17 #include <glib/gquark.h>
18 #include "xml/simple-node.h"
20 namespace Inkscape {
22 namespace XML {
24 /**
25 * @brief Processing instruction node, e.g. <?xml version="1.0" encoding="utf-8" standalone="no"?>
26 */
27 struct PINode : public SimpleNode {
28 PINode(GQuark target, Util::ptr_shared<char> content, Document *doc)
29 : SimpleNode(target, doc)
30 {
31 setContent(content);
32 }
33 PINode(PINode const &other, Document *doc)
34 : SimpleNode(other, doc) {}
36 Inkscape::XML::NodeType type() const { return Inkscape::XML::PI_NODE; }
38 protected:
39 SimpleNode *_duplicate(Document* doc) const { return new PINode(*this, doc); }
40 };
42 }
44 }
46 #endif
47 /*
48 Local Variables:
49 mode:c++
50 c-file-style:"stroustrup"
51 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
52 indent-tabs-mode:nil
53 fill-column:99
54 End:
55 */
56 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :