Share

AcDbObject::recvPropagateModify

C++

virtual ACDBCORE2D_PORT void recvPropagateModify(
    const AcDbObject* subObj
);

Description

This function is intended to be used to allow objects that are part of an ownership hierarchy to "propagate" the message that they've been modified. However, there is no enforcement of this use.

The AcDbObject::recvPropagateModify() implementation is to terminate AutoCAD. If this function is used, it must be overridden with a meaningful implementation.

If used at all, this function should be called from within an object's AcDbObject::xmitPropagateModify() function.

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.

It works in the following manner:

  1. The subobject class has its xmitPropagateModify() class overridden such that it calls its parent class's xmitPropagateModify() and also calls the owning object's recvPropagateModify().
  2. The "root" or "header" class has its 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.

The result is "modified" notification from both the subentity and the "root" or "header" entity.

When overriding this class, it should only be overridden in the class that is used for the "root" owner of a complex object. The overridden implementation should do whatever is necessary to make sure the actual "root" or "header" object triggers its modified notification (typically this is easiest done by having that object call assertWriteEnabled() -- just make sure the object is open for write).

Parameters

Parameters Description
subObj Input pointer to the object that has been modified

Links

AcDbObject

Was this information helpful?