API Reference


Brew Release
Brew MP 1.0.2
See Also
IListModel is inherited from the IModel interface and is used as a base class for models that manage data organized in lists or collections. The IListModel interface is not intended to be used directly, instead serving as a base from which other more sophisticated models will be derived. Two examples of models that derive from IListModel are the array and vector models.
As a minimal base class, it is important to note that the IListModel interface models only the structure of a simple list -- the size and current position of the list -- not the data actually stored in each item of the list.
IListModel provides object reference counting mechanisms that allow objects to manage their own memory instances. In addition, the interface provides APIs for registering a listener with a list model, as well as interfaces for manipulating the structural information stored in the model.
For model attribute usage, see the IModel Interface.
   IListModel *piListModel = 
   int index;
   int size = IListModel_Size(piListModel);
   for(index = 0; index < size; index++) {
      void* data = NULL;
      IListModel_GetAt(piListMode, index, &data);
      // ... Do interesting and amazing things with the data ...
  • Follow