diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2008-09-23 23:34:58 +0000 |
|---|---|---|
| committer | tweenk <tweenk@users.sourceforge.net> | 2008-09-23 23:34:58 +0000 |
| commit | 3547b1082098934d583f2c483c8eb5a59e9c2bbb (patch) | |
| tree | d62ab547cdc178ec6d4028d27aa6ba75714168c7 /src/xml/composite-node-observer.h | |
| parent | add a path parameter to doeffect_stack_test to test a bug + fix a stupid erro... (diff) | |
| download | inkscape-3547b1082098934d583f2c483c8eb5a59e9c2bbb.tar.gz inkscape-3547b1082098934d583f2c483c8eb5a59e9c2bbb.zip | |
* Lots of documentation for the Inkscape::XML namespace
* Doxygen fixes for a few files
* Garbage-collected allocator for STL containers
(bzr r6877)
Diffstat (limited to 'src/xml/composite-node-observer.h')
| -rw-r--r-- | src/xml/composite-node-observer.h | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/src/xml/composite-node-observer.h b/src/xml/composite-node-observer.h index 7b5a24d53..826467dc4 100644 --- a/src/xml/composite-node-observer.h +++ b/src/xml/composite-node-observer.h @@ -1,7 +1,7 @@ -/* +/** @file * Inkscape::XML::CompositeNodeObserver - combine multiple observers - * - * Copyright 2005 MenTaLguY <mental@rydia.net> + */ +/* Copyright 2005 MenTaLguY <mental@rydia.net> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -25,6 +25,14 @@ namespace XML { class NodeEventVector; +/** + * @brief An observer that relays notifications to multiple other observers + * + * This special observer keeps a list of other observer objects and sends + * the notifications it receives to all of them. The implementation of the class + * allows an observer to remove itself from this object during a method call. + * For the documentation of callback methods, see NodeObserver. + */ class CompositeNodeObserver : public NodeObserver, public GC::Managed<> { public: struct ObserverRecord : public GC::Managed<> { @@ -38,9 +46,25 @@ public: CompositeNodeObserver() : _iterating(0), _active_marked(0), _pending_marked(0) {} + /** + * @brief Add an observer to the list + * @param observer The observer object to add + */ void add(NodeObserver &observer); - void addListener(NodeEventVector const &vector, void *data); + /** + * @brief Remove an observer from the list + * @param observer The observer object to remove + */ void remove(NodeObserver &observer); + /** + * @brief Add a set of callbacks with associated data + * @deprecated Use add() instead + */ + void addListener(NodeEventVector const &vector, void *data); + /** + * @brief Remove a set of callbacks by its associated data + * @deprecated Use remove() instead + */ void removeListenerByData(void *data); void notifyChildAdded(Node &node, Node &child, Node *prev); @@ -69,9 +93,8 @@ private: void _finishIteration(); }; -} - -} +} // namespace XML +} // namespace Inkscape #endif /* |
