Foundation > Dynamic Modules > Loading a Dynamic Module > Implicit Mode
 
Implicit Mode
In implicit mode, Rogue Wave® Views loads new classes when they appear in a data file and when a class name is not registered in the loading application.
For this mode to work properly, you must create a module definition file. For Rogue Wave Views to know automatically which classes are defined and which dynamic module they are in, you must create a module definition file (with the.imd extension) and place it in the same directory as your shared library. This file must have the same name as the module, except that its extension must be imd, instead of so, sl, or dll. Creating this file allows Rogue Wave Views to know which classes are defined without having to open and read all the dynamic modules it finds.
Let us suppose that you have created the module myModule.dll on Microsoft Windows. You have to create a file called myModule.imd in the same directory as myModule.dll to enable Rogue Wave Views to call the classes defined in this file automatically.
The contents of this file is ASCII text that will be read by Rogue Wave Views at start-up to identify which classes are defined and in which module they are located. The file must always begin with the following lines:
<?xml version="1.0"?>
<module>
and end with the closing tag:
</module>
Within the <module> block, you must have any number of groups of the form:
<class name = "NewClass" rootClass = "RootClass"/>
where RootClass is the name of the topmost class in the class hierarchy (IlvGraphic, for example), and NewClass is the name of the class you created. If you have defined more than one class in your module, just add other <class> tags.
If the classes that are defined in your module derive from more than one root base class, you can add as many new blocks as there are root base classes.
When a Rogue Wave Views application starts, the module path is read to search for possible modules (files that have the proper extension). If both a module and an associated imd file are found, the description file is read and the information it contains is stored for future implicit class loading.

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.