1 /*
2 * Inkscape::XML::NodeObserver - interface implemented by observers of XML nodes
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_NODE_OBSERVER_H
16 #define SEEN_INKSCAPE_XML_NODE_OBSERVER_H
18 #include <glib/gquark.h>
19 #include "util/share.h"
21 namespace Inkscape {
22 namespace XML {
23 class Node;
24 }
25 }
28 namespace Inkscape {
30 namespace XML {
32 class NodeObserver {
33 public:
34 NodeObserver() {}
36 virtual ~NodeObserver() {}
38 virtual void notifyChildAdded(Node &node, Node &child, Node *prev)=0;
40 virtual void notifyChildRemoved(Node &node, Node &child, Node *prev)=0;
42 virtual void notifyChildOrderChanged(Node &node, Node &child,
43 Node *old_prev, Node *new_prev)=0;
45 virtual void notifyContentChanged(Node &node,
46 Util::shared_ptr<char> old_content,
47 Util::shared_ptr<char> new_content)=0;
49 virtual void notifyAttributeChanged(Node &node, GQuark name,
50 Util::shared_ptr<char> old_value,
51 Util::shared_ptr<char> new_value)=0;
52 };
54 }
56 }
58 #endif
59 /*
60 Local Variables:
61 mode:c++
62 c-file-style:"stroustrup"
63 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
64 indent-tabs-mode:nil
65 fill-column:99
66 End:
67 */
68 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :