The Build Class
Posted: Fri Jun 10, 2011 3:54 pm
The Build class is always avaiable in the template editor. It represents the build and contains methods to access all elements of a type as specified in the BuildConfig. For each Class X there is a method
which returns all instances of the Class X as given by the selected packages and instances in the BuildConfig.
This is usually how you start in a template: You iterate over all instances of some class. An alternative is to specify
in your topmost context. This means that the context is iterated exaclty once. You can use this when you want to generate a single file.
It is possible that in future more methods get added to access further properties of the build.
- Code: Select all
Build.allX
which returns all instances of the Class X as given by the selected packages and instances in the BuildConfig.
This is usually how you start in a template: You iterate over all instances of some class. An alternative is to specify
- Code: Select all
Build.once
in your topmost context. This means that the context is iterated exaclty once. You can use this when you want to generate a single file.
It is possible that in future more methods get added to access further properties of the build.