Once the decorator implementation has associated itself with a given model interface, it should register as a listener for that model. As a listener, the decorator implementation will receive notifications each time the model's data changes, thereby providing the opportunity for the decorator implementation to update its display or act in some other meaningful way to reflect the current data.
- p:Pointer to the IDecorator object.
- m:Pointer to the model interface that the decorator implementation should use as the basis for accessing its data.
int IDecorator_SetModel(IDecorator *p, IModel *pm);
AEE_SUCCESS - The function was able to successfully associate the decorator with the specified model interface. ECLASSNOTSUPPORT - The model interface passed to the function does not support a model interface class ID that is known to the decorator.