GroveWatcherBase — Base class for dynamic tracking of the changes in the grove.
class GroveWatcherBase { public: enum NotificationMask { NOTIFY_GENERIC = 001, NOTIFY_NODE_DESTROYED = 002, NOTIFY_CHILD_INSERTED = 004, NOTIFY_CHILD_REMOVED = 010, NOTIFY_ATTRIBUTE_CHANGED = 0100, NOTIFY_ATTRIBUTE_ADDED = 0200, NOTIFY_ATTRIBUTE_REMOVED = 0400, NOTIFY_TEXT_CHANGED = 01000, NOTIFY_NS_MAPPING_CHANGED = 02000, NOTIFY_ALL = 0xFFFF }; // construct/copy/destruct ~GroveWatcherBase(); // public member functions void nodeDestroyed(const GroveNode &) ; void childInserted(const GroveNode &) ; void childRemoved(const GroveNode &, const GroveNode &) ; void attributeChanged(const GroveAttr &) ; void attributeRemoved(const GroveElement &, const GroveAttr &) ; void attributeAdded(const GroveAttr &) ; void textChanged(const GroveText &) ; void genericNotify(const GroveNode &, void *) ; void nsMappingChanged(const GroveNodeWithNamespace &, const SString &) ; };
GroveWatcherBase
public member functionsHappens when node was destroyed. Actually this notification is called from node destructor, so be careful not to use node pointer for anything except synchronizing state (the pointer is OK, but node parent pointer is already zeroized etc.)
Happens when this node is inserted into node->parent().
Happens when child os removed from node children list. Note that child pointer is still valid, but parent pointer is already zeroized.
Attr-only event: called when value of attribute node is changed. node always has an Element as a parent.
Attr-only event: called immediately BEFORE attribute node is removed from it's parent element attribute list.
Attr-only: called when attribute node is added to the parent element.
Happens when text node is changed.
Generic notification.
Happens when namespace maping is changed.