next up previous contents
Next: 3.9 Deleting MDL Definitions Up: 3. The Model Definition Previous: 3.7 Immediate MDL Class Instantiation


3.8 Compiling MDL Classes

MDL class definitions can be compiled into VMAKE [62] compatible C++ projects. The compilation can be initiated either by using the C++ application interface of the
[4]Algorithm Library (Section 2.7) , or by including a sequence of the following two MDL commands in an input deck which is parsed by the MDL interpreter:

CompilerProject = "ProjectName";
compile "regexp";

The CompilerProject generates a new VMAKE project by creating the directory
[4]$VPROJECT/ProjectName, writing the appropriate project description file vmake.prj and the project rules file vmfile.mk. It can be followed by any number of compile statements. Each of them will generate a C++ header and a C++ definition file for every available MDL class definition which matches the regular expression regexp.

A subsequent execution of VMAKE generates an MDL model library with name libProjectName-sh.ext. The name of this library consists of the prefix string lib followed by the project name ProjectName as stated in the CompilerProject command, the post fix string -sh common to all shared libraries generated by VMAKE and a system dependent extension (mostly .so or sh).

This library can thereafter be dynamically loaded by using the LoadObjectLibrary command:

LoadObjectLibrary "ProjectName";


next up previous contents
Next: 3.9 Deleting MDL Definitions Up: 3. The Model Definition Previous: 3.7 Immediate MDL Class Instantiation
Robert Mlekus
1999-11-14