1 /** @file
2 * @brief Comment 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 *
13 */
15 #ifndef SEEN_INKSCAPE_XML_COMMENT_NODE_H
16 #define SEEN_INKSCAPE_XML_COMMENT_NODE_H
18 #include <glib/gquark.h>
19 #include "xml/simple-node.h"
21 namespace Inkscape {
23 namespace XML {
25 /**
26 * @brief Comment node, e.g. <!-- Some comment -->
27 */
28 struct CommentNode : public SimpleNode {
29 CommentNode(Util::ptr_shared<char> content, Document *doc)
30 : SimpleNode(g_quark_from_static_string("comment"), doc)
31 {
32 setContent(content);
33 }
35 CommentNode(CommentNode const &other, Document *doc)
36 : SimpleNode(other, doc) {}
38 Inkscape::XML::NodeType type() const { return Inkscape::XML::COMMENT_NODE; }
40 protected:
41 SimpleNode *_duplicate(Document* doc) const { return new CommentNode(*this, doc); }
42 };
44 }
46 }
48 #endif
49 /*
50 Local Variables:
51 mode:c++
52 c-file-style:"stroustrup"
53 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
54 indent-tabs-mode:nil
55 fill-column:99
56 End:
57 */
58 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :