1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /** @file
3  * @brief Comment node implementation
4  *//*
5  * Authors: see git history
6  *
7  * Copyright (C) 2018 Authors
8  * Copyright 2005 MenTaLguY <mental@rydia.net>
9  *
10  * Released under GNU GPL v2+, read the file 'COPYING' for more information.
11  */
12 
13 
14 #ifndef SEEN_INKSCAPE_XML_COMMENT_NODE_H
15 #define SEEN_INKSCAPE_XML_COMMENT_NODE_H
16 
17 #include <glib.h>
18 #include "xml/simple-node.h"
19 
20 namespace Inkscape {
21 
22 namespace XML {
23 
24 /**
25  * @brief Comment node, e.g. &lt;!-- Some comment --&gt;
26  */
27 struct CommentNode : public SimpleNode {
CommentNodeCommentNode28     CommentNode(Util::ptr_shared content, Document *doc)
29     : SimpleNode(g_quark_from_static_string("comment"), doc)
30     {
31         setContent(content);
32     }
33 
CommentNodeCommentNode34     CommentNode(CommentNode const &other, Document *doc)
35     : SimpleNode(other, doc) {}
36 
typeCommentNode37     Inkscape::XML::NodeType type() const override { return Inkscape::XML::NodeType::COMMENT_NODE; }
38 
39 protected:
_duplicateCommentNode40     SimpleNode *_duplicate(Document* doc) const override { return new CommentNode(*this, doc); }
41 };
42 
43 }
44 
45 }
46 
47 #endif
48 /*
49   Local Variables:
50   mode:c++
51   c-file-style:"stroustrup"
52   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
53   indent-tabs-mode:nil
54   fill-column:99
55   End:
56 */
57 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
58