Developer

API Reference

IValueModel_SetValue()

Brew Release
Brew MP 1.0.2
See Also
Model Events PFNADAPTSET IValueModel_GetValue() IValueModel_AdaptGet() IValueModel_AdaptSet()
Description
This function changes the value of the data stored in a value model, freeing (if necessary) any memory required to store the previously value.
Parameters
  • pif
    []:
    Pointer to the IValueModel interface object.
  • pValue
    []:
    The value to be stored into the value model. Depending on the complexity of the data being modeled, 'v' may be as simple as a boolean or integer value, but may also be passed as a pointer to a more complex data structure.
  • n
    []:
    When 'v' is a pointer to the data to be stored, 'n' is the length of that data in bytes. Otherwise, less complex value models may pass the data length as zero.
  • pfn
    []:
    Pointer to the callback function that BREW will call to free existing data stored in the value model. If no special function is required to free the model data, pass NULL.
Interface
Prototype
   void IValueModel_SetValue(IValueModel *pif, void *pValue, int nLen, PFNVALUEFREE pfn)
Return
None
Side Effect
Changing the value model by calling IValueModel_SetValue() will cause BREW to send an EVT_MDL_VALUE ModelEvent to any object that has registered as a listener with the model.
Comment
None
  • Follow