MFC Grid manual

CDataObject::ISink Class Reference

Interface to receive notifications from CDataObject. More...

#include <DataObject.h>

Inherited by CDelegate::Impl, and CDispatcher.

List of all members.


Public Member Functions

virtual void OnUpdate (FID fid, const CDataObject *dataObject)=0
 Called when the field is updated.
virtual void OnUpdate (const Fids &fids, const CDataObject *dataObject)
 Called when the fields are updated.
virtual void OnDelete (const CDataObject *dataObject)
 Called when the object ends its life cycle.

Detailed Description

Interface to receive notifications from CDataObject.

This interface can be used to receive notifications from CDataObject. For instance, GUI::CGrid receives notifications from this interface to update and to highlight a text in cells. It automatically displaces the lines according to sort rules and manages its visibility according to filter rules.


Member Function Documentation

void OnUpdate ( FID  fid,
const CDataObject dataObject 
) [pure virtual]

Called when the field is updated.

Parameters:
[in] fid Identifier that corresponds to the modified field.
[in] dataObject Pointer to CDataObject which sends notification.
thread-safety:
To prevent dead-lock between two ore more threads, this function is called without synchronization object (mutex or critical section) acquiring.

void OnUpdate ( const Fids fids,
const CDataObject dataObject 
) [virtual]

Called when the fields are updated.

Parameters:
[in] fids List of the identifiers that correspond to the modified fields
[in] dataObject Pointer to CDataObject which sends notification.
thread-safety:
To prevent dead-lock between two ore more threads, this function is called without synchronization object (mutex or critical section) acquiring.

void OnDelete ( const CDataObject dataObject  )  [virtual]

Called when the object ends its life cycle.

Parameters:
[in] dataObject Pointer to CDataObject which sends notification.
thread-safety:
To prevent dead-lock between two ore more threads, this function is called without synchronization object (mutex or critical section) acquiring.
Note:
Usually this method should not be called. Nevertheless when this function is called, it means that the listener didn't unsubscribe from CDataObject before its destruction. GUI::CGrid uses this notification to remove all the lines that correspond to deleting CDataObject.