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


API Reference


Brew Release
Brew MP 1.0.2
See Also
- PFNTADAPTSET - ITypedValueModel_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 ITypedValueModel_SetValue(). Models that store arbitrarily complex data may use a callback (defined by PFNTADAPTSET) 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 ITypedValueModel interface object.
Pointer to the callback function that the model 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 PFNTADAPTSET function when the model has been asked to store new data.
  •    void ITypedValueModel_AdaptSet(ITypedValueModel *pif, PFNTADAPTSET pfn, void *pvCtx); 
  • None
Side Effect
  • None
ITypedValueModel_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 ITypedValueModel_SetValue() after first nitializing the callback via ITypedValueModel_AdaptSet().