Share

AcDbObject::xmitPropagateModify

C++

virtual ACDBCORE2D_PORT void xmitPropagateModify() const;

Description

Within an object's close() method is a call to the object's xmitPropagateModify().The AcDbObject::xmitPropagateModify() default implementation is to inform the containing database that the object has been modified, appended to the database, or erased. The database then sends out the appropriate notification to any AcDbDatabaseReactors attached to it.

Within AutoCAD, this function is used by complex entities such as polylines to allow the subentities to notify the header that they have been changed. The header can then "propagate" the notification by sending its own notification that the "complex entity" has been modified.

The way this works is:

  1. The subobject class has it's xmitPropagateModify() class overridden such that it calls it's parent class's xmitPropagateModify() and also calls the owning object's recvPropagateModify().
  2. The "root" or "header" class has it's recvPropagateModify() overridden to provide an implementation that triggers "modified" notification to be sent for the "root" or "header" (which effectively represents the whole complex object).
  3. The subobject's close() triggers "modified" notification for the subobject and calls the subobject's xmitPropagateModify() function. So, when the subobject's close() is called, its xmitPropagateModify() is called. This then calls the owning object's recvPropagateModify(), which then triggers the owner to send "modified" notification.

So, the result is a "modified" notification from both the subentity and the "root" or "header" entity.

When overridden, this function should:

  1. Call its parent class's xmitPropagateModify() (which ultimately results in the execution of AcDbObject::xmitPropagateModify() to trigger database notification).
  2. Call its owner's recvPropagateModify() (passing in its "this" pointer) to "propagate" the notification information to the "root" owner to be sent out.

Links

AcDbObject

Was this information helpful?