dc68a4f4a7f4f0bef140b93b081a39d11afbd483
1 /*
2 * Inkscape::XML::LogBuilder - NodeObserver which builds an event log
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_LOG_BUILDER_H
16 #define SEEN_INKSCAPE_XML_LOG_BUILDER_H
18 #include "gc-managed.h"
19 #include "xml/node-observer.h"
21 namespace Inkscape {
22 namespace XML {
24 class Event;
26 class LogBuilder {
27 public:
28 LogBuilder() : _log(NULL) {}
29 ~LogBuilder() { discard(); }
31 void discard();
32 Event *detach();
34 void addChild(Node &node, Node &child, Node *prev);
36 void removeChild(Node &node, Node &child, Node *prev);
38 void setChildOrder(Node &node, Node &child,
39 Node *old_prev, Node *new_prev);
41 void setContent(Node &node,
42 Util::shared_ptr<char> old_content,
43 Util::shared_ptr<char> new_content);
45 void setAttribute(Node &node, GQuark name,
46 Util::shared_ptr<char> old_value,
47 Util::shared_ptr<char> new_value);
49 private:
50 Event *_log;
51 };
53 }
54 }
56 #endif
57 /*
58 Local Variables:
59 mode:c++
60 c-file-style:"stroustrup"
61 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
62 indent-tabs-mode:nil
63 fill-column:99
64 End:
65 */
66 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :