Notification Overview

When an event occurs in the system, certain objects, called notifiers, automatically relay the event to other objects. For example, when a user copies, erases, or modifies an object, or when a user issues an UNDO or REDO command, a corresponding notification for each event is automatically triggered.

The objects receiving the events are called reactors. A reactor must be explicitly added to a notifier's reactor list before it can receive events from the notifier. A given notifier can have a number of reactors in its reactor list. The reactor's class definition includes various notification functions. When an event occurs, the notifier automatically invokes the corresponding notification function of each reactor in its reactor list.

To use a reactor in an application

  1. Derive a new reactor class and implement the notification functions for the events your reactor will respond to.
  2. Instantiate the reactor.
  3. Add the reactor to the reactor list of the notifier.

When finished using the reactor

  1. Remove the reactor from the reactor lists of all notifiers to which it has been added.
  2. Delete the reactor (unless it is a database-resident object).

Using reactors requires creating subclasses of reactor classes or of AcDbObject classes. This section assumes that you are familiar with the material presented in Deriving a Custom ObjectARX Class and Deriving from AcDbObject.