Developer

API Reference

IValueModel_AdaptGet()

Brew Release
Brew MP 1.0.2
See Also
- PFNADAPTGET
- IValueModel_GetValue()
Description
This function sets up the callback function and private data to be used by the value model when retrieving data from the model via IValueModel_GetValue(). Models that store arbitrarily complex data may use a callback (defined by PFNADAPTGET) 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.
Parameters
  • pif
    []:
    Pointer to the IValueModel interface object.
  • pfn
    []:
    Pointer to the callback function that BREW will call to retrieve the data stored in a value model.
  • pvCtx
    []:
    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 PFNADAPTGET function when the model has been asked to retrieve the data.
Interface
Prototype
   void IValueModel_AdaptGet(IValueModel *pif, PFNADAPTGET pfn, void *pvCtx); 
Return
None
Side Effect
None
Comment
IValueModel_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 IValueModel_GetValue() after first initializing the callback via IValueModel_AdaptGet().
  • Follow