Name

GroveWatcherBase — Base class for dynamic tracking of the changes in the grove.

Synopsis

class GroveWatcherBase:
  

  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
  __del__()

  # public member functions

  None nodeDestroyed(const GroveNode &) 
  None childInserted(const GroveNode &) 
  None childRemoved(const GroveNode &, const GroveNode &) 
  None attributeChanged(const GroveAttr &) 
  None attributeRemoved(const GroveElement &, const GroveAttr &) 
  None attributeAdded(const GroveAttr &) 
  None textChanged(const GroveText &) 
  None genericNotify(const GroveNode &, void *) 
  None nsMappingChanged(const GroveNodeWithNamespace &, const SString &) 

Description

GroveWatcherBase construct/copy/destruct

  1. __del__()


GroveWatcherBase public member functions

  1. None nodeDestroyed(const GroveNode & )

    Happens 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.)


  2. None childInserted(const GroveNode & )

    Happens when this node is inserted into node->parent()


  3. None childRemoved(const GroveNode & , const GroveNode & )

    Happens when child os removed from node children list. Note that child pointer is still valid, but parent pointer is already zeroized.


  4. None attributeChanged(const GroveAttr & )

    Attr-only event: called when value of attribute node is changed. node always has an Element as a parent.


  5. None attributeRemoved(const GroveElement & , const GroveAttr & )

    Attr-only event: called immediately BEFORE attribute node is removed from it's parent element attribute list.


  6. None attributeAdded(const GroveAttr & )

    Attr-only: called when attribute node is added to the parent element.


  7. None textChanged(const GroveText & )

    Happens when text node is changed.


  8. None genericNotify(const GroveNode & , void * )

    Generic notification.


  9. None nsMappingChanged(const GroveNodeWithNamespace & , const SString & )

    Happens when namespace maping is changed.