API Reference | developer.brewmp.com API Reference | developer.brewmp.com


API Reference


Brew Release
Brew MP 1.0.2
See Also
- PFNADAPTSET - IValueModel_SetValue()
This function sets up the callback function and private data to be used by the value model when storing data in the model via IValueModel_SetValue(). Models that store arbitrarily complex data may use a callback (defined by PFNADAPTSET) to store specific portions of the model's data. For example, a value model that stores information to be displayed in a list, say, an icon, some text, plus some indication of the text style -- could specify an adaptive set callback routine that would set just the text, or just the icon -- apart from the entire data structure.
Pointer to the IValueModel interface object.
Pointer to the callback function that BREW will call to store the data provided to a value model.
Pointer to a private context controlled by the value model. A complex value model may need access to specialized information not normally available when storing new data in the model. This pointer is passed to the model's PFNADAPTSET function when the model has been asked to store new data.
  •    void IValueModel_AdaptSet(IValueModel *pif, PFNADAPTSET pfn, void *pvCtx); 
  • None
Side Effect
  • None
IValueModel_AdaptSet() sets up the adaptive set callback function and the private context data used by the callback -- it does _not_ actually store new data in the value model. To store data in the value model's data store, models should call IValueModel_SetValue() after first nitializing the callback via IValueModel_AdaptSet().