Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
document.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
/*
5 * Authors: see git history
6 *
7 * Copyright (C) 2011 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#ifndef SEEN_INKSCAPE_XML_SP_REPR_DOC_H
14#define SEEN_INKSCAPE_XML_SP_REPR_DOC_H
15
16#include "xml/node.h"
17
18namespace Inkscape {
19namespace XML {
20
21class Event;
22
43struct Document : virtual public Node {
44public:
53 virtual bool inTransaction()=0;
60 virtual void beginTransaction()=0;
68 virtual void rollback()=0;
74 virtual void commit()=0;
85 virtual Event *commitUndoable()=0;
92 virtual Node *createElement(char const *name)=0;
93 virtual Node *createTextNode(char const *content)=0;
94 virtual Node *createTextNode(char const *content, bool is_CData)=0;
95 virtual Node *createComment(char const *content)=0;
96 virtual Node *createPI(char const *target, char const *content)=0;
99 Document *duplicate(Document *doc) const override = 0;
100
107 virtual NodeObserver *logger()=0;
108};
109
110}
111}
112
113#endif
114/*
115 Local Variables:
116 mode:c++
117 c-file-style:"stroustrup"
118 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
119 indent-tabs-mode:nil
120 fill-column:99
121 End:
122*/
123// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Enumeration of all XML event types.
Definition event.h:53
Interface for XML node observers.
Interface for refcounted XML nodes.
Definition node.h:80
virtual char const * name() const =0
Get the name of the element node.
virtual char const * content() const =0
Get the content of a text or comment node.
Helper class to stream background task notifications as a series of messages.
Interface for XML documents.
Definition document.h:43
virtual bool inTransaction()=0
Checks whether there is an active transaction for this document.
virtual Event * commitUndoable()=0
Commit a transaction and store the events for later use.
virtual NodeObserver * logger()=0
Get the event logger for this document.
virtual void commit()=0
Commit a transaction and discard change data.
Document * duplicate(Document *doc) const override=0
Create a duplicate of this node.
virtual Node * createTextNode(char const *content)=0
virtual Node * createTextNode(char const *content, bool is_CData)=0
virtual Node * createElement(char const *name)=0
virtual Node * createComment(char const *content)=0
virtual Node * createPI(char const *target, char const *content)=0
virtual void rollback()=0
Restore the state of the document prior to the transaction.
virtual void beginTransaction()=0
Begin a transaction and start recording changes.
Interface for XML nodes.