Code

merge XML::Session into XML::Document
[inkscape.git] / src / xml / document.h
1 /*
2  * Inkscape::XML::Document - interface for XML documents
3  *
4  * Copyright 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_SP_REPR_DOC_H
16 #define SEEN_INKSCAPE_XML_SP_REPR_DOC_H
18 #include "xml/node.h"
20 namespace Inkscape {
21 namespace XML {
23 class Event;
24 class NodeObserver;
26 struct Document : virtual public Node {
27 public:
28     virtual NodeObserver *logger()=0;
30     virtual bool inTransaction()=0;
32     virtual void beginTransaction()=0;
33     virtual void rollback()=0;
34     virtual void commit()=0;
35     virtual Inkscape::XML::Event *commitUndoable()=0;
37     virtual Node *createElementNode(char const *name)=0;
38     virtual Node *createTextNode(char const *content)=0;
39     virtual Node *createCommentNode(char const *content)=0;
40 };
42 }
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 :