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.
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.