Resources | Resources |



About MIFs

The MIF is a binary file of structured data about a module, and describes resources that the module requires.

Contents of the MIF

If a module creates a class, its CIF has a Class primitive with a newfunc element that points to the function that creates an instance of the class. For example, the SimpleIOEcho.cif file in the folder contains the following Class primitive:

-- Every class must be bound to its New function
Class {
   classid = AEECLSID_SimpleIOEcho,
   newfunc = SimpleIOEcho_New

Note: The newfunc element is used only with Brew MP 1.0 and greater versions, which use executable MOD1 files. BREW 3.x and earlier versions use executable MOD files, and the newfunc element is not used in its modules' CIF files.

The Brew MP environment maintains a database of classes based on the MIF files. When an application creates a particular class, the Brew MP environment looks for the owning module that implements an instance of that class.

The folder contains all the files related to a sample applet, and so the applet's CIF file, capp.cif, includes the following Applet primitive:

Applet {
   appletid       =  AEECLSID_CAPP,
   resbaseid      =  20, -- Applet base resource id
   applethostid   =  0,
   type           =  0,

Creating a MIF File

To create a MIF file, you first create one or more CIF files and then compile them into a MIF file using the CIFC compiler. Every module is associated with one, and only one, MIF file. You can use the command-line CIFC compiler to compile multiple CIF files into a single MIF file.

Note: For more information about using the CIFC compiler to compile CIF files into MIF files (and CAR files into BAR files), check the Tools Reference on the Brew MP Developer website.