13.3. Adding New IDLs to a Library

To build a library with managed classes, descriptions of the classes are required. These descriptions are written in special IDL files as described in sections below. To process the IDL files, mkgen.pl must know their names, names of files that are generated from the IDL files, and dependencies of those files. This information is automatically generated by the genmkgen.pl tool, which reads the idl.list file and generates makefile_idl.gen, which is then included into makefile.gen.

IDL files usually require (import) other IDL files, and some of them may belong to other library. These dependencies are described by the depends directives in the idl.list files:

    (5)  # We use managed classes from the Core library.
    (6)
    (7)  depends ../../core

In this case, some IDLs from the src/core directory are required. All directories specified by the depends directive must contain an idl.list file. Note that the depends directive must be also used when a C++ source includes a source generated in an IDL file that is part of the idl.list in the specified directory. All required directories must be listed, depends won't be searched recursively.

List of all IDL files that belong to the library must be specified in the idl.list using the idl directive:

    (9)  # List of files containing descriptions of managed classes.
   (10)
   (11)  idl hello_interface.idl
   (12)  idl hello.idl

This example contains two classes, interface and implementation, each described in its own IDL file.