API Reference


Brew Release
Brew MP 1.0.2
See Also
IDecorator Interface IModel Interface IDecorator_GetModel() IModel_AddListener()
This function allows a decorator implementation to associate itself with a specific model interface. To make this association, an application would first retrieve an IModel pointer for the desired interface class ID, then attach this model to the decorator implementation by passing the model pointer and decorator pointer to IDecorator_SetModel().
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.

Side Effect
  • Follow