1 /*
2 * Inkscape::XML::Session - context for transactions
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_SESSION_H
16 #define SEEN_INKSCAPE_XML_SESSION_H
18 namespace Inkscape {
20 namespace XML {
22 class Event;
23 class Node;
25 class Session {
26 public:
27 Session() {}
28 virtual ~Session() {}
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 }
44 }
46 #endif
47 /*
48 Local Variables:
49 mode:c++
50 c-file-style:"stroustrup"
51 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
52 indent-tabs-mode:nil
53 fill-column:99
54 End:
55 */
56 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :