Code

5cff9caf6f218e28faee4fe3233f6cc916fa61ee
[inkscape.git] / src / xml / comment-node.h
1 /*
2  * Inkscape::XML::CommentNode - simple XML comment 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 struct CommentNode : public SimpleNode {
26     CommentNode(Util::ptr_shared<char> content, Document *doc)
27     : SimpleNode(g_quark_from_static_string("comment"), doc)
28     {
29         setContent(content);
30     }
32     CommentNode(CommentNode const &other, Document *doc)
33     : SimpleNode(other, doc) {}
35     Inkscape::XML::NodeType type() const { return Inkscape::XML::COMMENT_NODE; }
37 protected:
38     SimpleNode *_duplicate(Document* doc) const { return new CommentNode(*this, doc); }
39 };
41 }
43 }
45 #endif
46 /*
47   Local Variables:
48   mode:c++
49   c-file-style:"stroustrup"
50   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
51   indent-tabs-mode:nil
52   fill-column:99
53   End:
54 */
55 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :