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


API Reference


Brew Release
Brew MP 1.0.2
See Also
- PFNTADAPTGET - ITypedValueModel_GetValue()
This function sets up the callback function and private data to be used by the value model when retrieving data from the model via ITypedValueModel_GetValue(). Models that store arbitrarily complex data may use a callback (defined by PFNTADAPTGET) to retrieve 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 get callback routine that could return 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 retrieve the data stored in 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 accessing the data stored in the model. This pointer is passed to the model's PFNTADAPTGET function when the model has been asked to retrieve the data.
  •    void ITypedValueModel_AdaptGet(ITypedValueModel *pif, PFNADTAPTGET pfn, void *pvCtx); 
  • None
Side Effect
  • None
ITypedValueModel_AdaptGet() sets up the adaptive get callback function and the private context data used by the callback -- it does _not_ actually get the data stored in the value model. To retrieve specific pieces of data from the data store, models should call ITypedValueModel_GetValue() after first initializing the callback via ITypedValueModel_AdaptGet().