Table of Contents

Module

Modules are base nodes used in XL models. They extends Node by default, but can extend another object if specified. To be used in a project modules are classes defined with:

  1. A public constructor with all its fields as variables
  2. Fields for each of the module attributes
  3. Accessor methods for these fields
  4. A parametrized pattern with all of its attributes as variable

Declaration

Modules are declared similarly as classes. Their declaration include:

Modules are declared in XL with the keyword module (different from the java keyword module).

module A(int attr1, Object attr2) extends N { /* body */ } ;

→ Read more...

Instantiation

Instantiations are additional transient “sub-graphs” that can be resolved by a visitor. The most common example of instantiation is the additional 3D shapes added to a Node when it is represented in the 3D scene. The objects created in the instantiation are linked to the Node who have declare that instantiation. (For instance, the raytracing consider all shapes from a Node instantiation to be the Node - thus the node get absorbed light include the shapes).

Instantiations are not connected to the data graph. Thus, they are not included in queries.

Modules implicitly declare the instantiator and instantiation producer required to create an instantiation by using the syntax:

 module A 
   ==> PRODUCTION ; // instantiation declaration

→ Read more...