Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-defs.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_SP_DEFS_H
3#define SEEN_SP_DEFS_H
4
5/*
6 * SVG <defs> implementation
7 *
8 * Authors:
9 * Lauris Kaplinski <lauris@kaplinski.com>
10 * Abhishek Sharma
11 *
12 * Copyright (C) 2000-2002 authors
13 *
14 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
15 */
16
17#include "sp-object.h"
18
19class SPDefs final : public SPObject {
20public:
21 SPDefs();
22 ~SPDefs() override;
23 int tag() const override { return tag_of<decltype(*this)>; }
24
25protected:
26 void build(SPDocument* doc, Inkscape::XML::Node* repr) override;
27 void release() override;
28 void update(SPCtx* ctx, unsigned int flags) override;
29 void modified(unsigned int flags) override;
30 Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
31};
32
33#endif // !SEEN_SP_DEFS_H
34
35/*
36 Local Variables:
37 mode:c++
38 c-file-style:"stroustrup"
39 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
40 indent-tabs-mode:nil
41 fill-column:99
42 End:
43*/
44// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Definition cast.h:26
Interface for refcounted XML nodes.
Definition node.h:80
int tag() const override
Definition sp-defs.h:23
void release() override
Definition sp-defs.cpp:39
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Definition sp-defs.cpp:78
~SPDefs() override
void modified(unsigned int flags) override
Definition sp-defs.cpp:58
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Definition sp-defs.cpp:34
SPDefs()
Definition sp-defs.cpp:29
void update(SPCtx *ctx, unsigned int flags) override
Definition sp-defs.cpp:43
Typed SVG document implementation.
Definition document.h:101
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
Inkscape::XML::Node * repr
Definition sp-object.h:193
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94