NDObjectHandler Class Reference

Provides an interface for responding to object-related events, such as object updates, enters, and exits. More...

List of all members.

Public Member Functions

virtual NDResult ndOnUpdateObject (NDObject *obj, NDObjectChanges *changed, NDNodeID node)=0
 This callback called is each time an object is updated.
virtual NDResult ndOnEnterObject (NDObject *obj)=0
 This callback is called each time an object enters the current area of interest.
virtual NDResult ndOnExitObject (NDObject *obj)=0
 This callback is called each time an object exits the current area of interest.

Detailed Description

To use this class, create a subclass which implements all the functions in this interface. Then, register the handler by calling NDChannel::registerObjectHandler.


Member Function Documentation

NDObjectHandler::ndOnEnterObject ( NDObject obj  )  [pure virtual]

This is similar to a "create" callback, but there are scenarios in which it is not the same as a create. For example, if using multiple zones, it's possible that an object already existed in another zone and has simply entered our current zone, hence the name "enter".

Parameters:
obj the object which entered our area of interest.
NDObjectHandler::ndOnExitObject ( NDObject obj  )  [pure virtual]

This is similar to a "create" callback, but there are scenarios in which it is not the same as a create. For example, if using multiple zones, it's possible that an object already existed in another zone and has simply exited our current zone, hence the name "exit".

Parameters:
obj the object which exited our area of interest.
NDObjectHandler::ndOnUpdateObject ( NDObject obj,
NDObjectChanges changed,
NDNodeID  node 
) [pure virtual]
Parameters:
obj the object which was updated, prior to applying the updates
changed an iterator containing the list of changes to the object
node the nodeID of the node from which this object update originated

Generated on Wed Jul 21 18:14:48 2010 for nd2 by  doxygen 1.6.1