Resources | Resources |



Using the Add Class wizard

The Add Class wizard adds new files to the selected project (source/header/bid files), and updates the project CIF (if found) with the new class declaration.

To access the wizard, do the following:

  1. Right-click on your project within Visual Studio Solution Explorer, and from the menu select Add > Class.

    The Add Class dialog opens.

  2. In the Add Class dialog select Brew MP. Three class options display under Templates as shown in the following image.

    • Applet Class: This is the only class that can be executed (similar to an EXE). It is the class used in Brew MP application modules.
    • In-Process Class: The in-process and service classes (similar to a Windows DLL) are used in Brew MP extension modules.
    • Service Class: Service classes can only be added to MOD1/DLL1 projects.

  3. Select the class, enter a name for the class in the Name field, and enter a location in the Location field,

    Click Add.

    The project is updated with the new class.

Using the new class

For MOD1/DLL1 projects, the added class declaration in the CIF handles the glue code to create and instantiate your class calling the provided new function.

Applet classes can be selected in the Project > Properties > Brew MP > Run dialog, by selecting Run Applet, then the class AppletID.

Running or debugging the project launches the new applet class without any code modifications.

For MOD/DLL projects, a readme file is generated (AddClassReadMe.txt) with instructions on how to modify your code to instantiate the new class.