This interface provides a notification mechanism for objects that need to be
informed of changes made to another object. An observer attaches to the subject interface (ISubject) on the object it wants to be notifed of when a change occurs. The observed object can be another boss object, or itself if the observer is interested in changes made to its own interfaces. An object is allowed to have multiple IObserver interfaces as long as each observer has a unique interface ID.
- See Also
- ISubject for documentation on the two types of notification available, regular notification and lazy notification.
Lazy notification of a change in an observed subject; this method is called after the transaction in which the change was performed completes and after undo or redo.
- Parameters
| theSubject | is the subject that changed |
| protocol | is the interface of the subject's boss that changed |
| data | lazy notification data or nil. Observers must be able to handle a call that has nil data. In certain low memory conditions the lazy notification data passed to ISubject::ModelChange may not be passed on to observers. The observer must be able to work without data in which case the observer would usually refresh its entire state by re-examining all objects of interest. See LazyNotificationData for documentation. |
- See Also
- ISubject::AttachObserver(IObserver*, const PMIID&, AttachmentType) to receive lazy notification attach to the subject by calling this method specifying an attachment type of lazy, or, both if you also want regular notification.
- IObserver::Update for regular notification
Implemented in LnkWtchActiveContextObserver, CusDtLnkUITreeObserver, PnlTrvTreeObserver, IDHAObserver, LnkWtchCacheManager, CustSEObserver, CusDtLnkDocObserver, CObserver, and CusCondTxtTreeViewObserver.
| virtual void IObserver::Update | ( | const ClassID & | theChange, | | | ISubject * | theSubject, | | | const PMIID & | protocol, | | | void * | changedBy | | ) | | |
| pure virtual |
Regular notification of a change in an observed subject; this method is called immediately after the
change is made, it is not called on undo or redo.
- Parameters
| theChange | represents the change to an object, often this is the ClassID of the command that made the change |
| theSubject | is the subject that changed |
| protocol | is the interface of the subject's boss that changed |
| changedBy | is used to pass additional data about the change, often this is a pointer to the command that caused the change |
- See Also
- ISubject::AttachObserver(IObserver*, const PMIID&, AttachmentType) to receive regular notification attach to the subject by calling this method specifying an attachment type of regular, or, both if you also want lazy notification. You can also receive regular notification by attaching to the subject using ISubject::AttachObserver(IObserver*,const PMIID&,const PMIID&).
- IObserver::LazyUpdate for lazy notification
Implemented in SelectionHighlightObserver, TranFxUIDialogObserver, CusDtLnkUITreeObserver, PnlTrvTreeObserver, PstLstDocObserver, CustomHttpLinkUIPlaceButtonObserver, DCLSizListBoxObserver, PDFVTUIDialogObserver, PnlTrvNodeObserver, CusDtLnkUITreeNodeObserver, LnkWtchActiveContextObserver, PreviewableColorListObserver, GTTxtEdtStoryObserver, SnipRunPanelWidgetObserver, CustomHttpLinkUIObserver, LnkWtchCacheManager, WLBCmpListBoxObserver, SnipRunGoButtonObserver, WatermarkUIDialogObserver, BscSlDlgDialogObserver, IDHAObserver, XDocBkUIDialogObserver, BscSlDlgTabDialogObserver, WLBCmpEyeballObserver, WLBCmpPenObserver, BscL10NDialogObserver, CustSEObserver, TxtExpDialogObserver, BscDlgDialogObserver, CusDtLnkUIBrowsDialogObserver, GTTxtEdtNewDeleteStoryObserver, TblBscDialogObserver, GTTxtEdtGoToTextButtonObserver, PreflightCheckBoxObserver, CusDtLnkDocObserver, PicIcoRollOverButtonObserver, WFPDialogObserver, CdlChtUIWidgetObserver, ActiveSelectionObserver, TKIPanelWidgetObserver, TblAttWidgetObserver, TableCellObserver, CelPnlEditBoxObserver, SwatchesObserver, CusCondTxtTreeViewObserver, CDialogObserver, CSelectableDialogObserver, and TKITreeWidgetObserver.