next up previous contents
Next: Example for Using Up: 3.2 MDL Classes Previous: The return Statement

3.2.5 Sub-Model Classes

The concept of aggregating the functionality of several MDL model classes can be realized by using sub-Model instances. Once such a sub-Model instance instance_name of the MDL class class_name is defined, all methods and interface parameters of the sub-Model can be accessed by using instance_name as a qualifier for the according parameter and method names. The statement to generate an MDL class instance instance_name with the MDL class type class_name looks like:

Instance instance_name = class_name;

Note that interface parameters of sub-Model instances are linked automatically to interface parameters of the actual model if both have the same name and type. Therefore it is not necessary to copy such parameter values manually.

Robert Mlekus