ILOG
Welcome, Guest | Sign In


Blogs | Forums | Worldwide sites | Contact us

title element1
Product Info
Features
Tutorial
Datasheet
Supported platforms
Technical Forum
Solutions
Customers
News & Events
Press releases
Trial & Purchase
Demos
Evals
Contact info
Tutorial  

ILOG Views Controls

This step addresses code generation. Following application-panel design, this is the last step before C++ coding.

Before generating code with ILOG Studio, we must configure code generation for each panel and the application.

Panel settings
Double click on the main panel icon in the Classes subwindow and click the Inspect Panel Class button.  

This brings up the Panel Class Inspector:

  • Class: Name of the generated class. In the previous step, we saw that the class name was not modifiable in the Panel Inspector. Here you can modify it.
  • Base Class: The IlvGadgetContainer option lets you generate a class for a standard user-interface panel. This is the most commonly used option. The other option, IlvDialog, is for designing specific dialogs (for example, a window without a border or without a minimize or maximize icon).
  • File Name: This field cannot be modified. It just indicates the name of the file. If you want to change it, use the Save As option.
  • Directories: Data, header, and source directories let you specify where you want to generate C++ and header files. The data directory is not modifiable; it is the directory where you saved the graphic ILV file.

At this stage, the only fields you may want to change are the header and source fields, which will allow the generated code to be stored properly on your disk. If these fields are left blank, header and source files will be generated in the same directory as the ILV file.

Application Settings
Let's see how we can configure application for code generation. Press the Inspect Application button in ILOG Studio's main window.  

You will see the Application Inspector, which lets you change application-code generation options:

  • Class: Name of the generated class for the application.
  • Base Class: By default, your application class will derive from the IlvApplication class (ILOG Views' basic application class). If you define your own application class, it may be useful to change this Base Class field.
  • File Name: File name of your application file (IVA). It is not modifiable.
  • Directories: Header, Source, and Objects fields let you specify where you want files to be generated.

Here again, the only changes necessary are modifying header and source directories, which allow the application's header and C++ files to be generated in the correct location.

Once you have made all modifications, don't forget to save the application settings by saving the IVA file.

Code Generation
Now proceed to code generation. Select the Code�Generate All command. This action will generate header and C++ source files for the application and each panel, as well as a "makefile" if you asked for it.

You can launch your favorite C++ compiler to compile and link all these files. You should run an application just as it was operating when you tested it in ILOG Studio. Once started, the application only pops up the main panel. If you press one of the buttons, you a small pop-up window will appear, indicating the name of the corresponding callback function. Our application is running, but it still does nothing.

Learn More
    Features  
    Charts  
    Maps  
    Graph Layout  
    Controls  
    Data Access  
    Gantt Chart  
     
ILOG JViews Diagrammer
(includes Graph Layout)
ILOG JViews Maps
ILOG JViews Gantt
ILOG JViews Charts
ILOG JViews Telecom Graphic Objects
ILOG JViews Maps for Defense
Customer Spotlight
   
     
 
 
element3