composite-node-observer.h revision 4fad0164a37a4004e4568803b7817df5e6b017d9
/** @file
* Inkscape::XML::CompositeNodeObserver - combine multiple observers
*/
/* Copyright 2005 MenTaLguY <mental@rydia.net>
*
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* See the file COPYING for details.
*
*/
#include "gc-managed.h"
#include "xml/node-observer.h"
#include "util/list-container.h"
struct 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.
*/
bool marked; //< if marked for removal
};
/**
* @brief Add an observer to the list
* @param observer The observer object to add
*/
/**
* @brief Remove an observer from the list
* @param observer The observer object to remove
*/
/**
* @brief Add a set of callbacks with associated data
* @deprecated Use add() instead
*/
/**
* @brief Remove a set of callbacks by its associated data
* @deprecated Use remove() instead
*/
void removeListenerByData(void *data);
unsigned _iterating;
unsigned _active_marked;
unsigned _pending_marked;
void _startIteration() { ++_iterating; }
void _finishIteration();
};
} // namespace XML
} // namespace Inkscape
#endif
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :