# Introduction

The Torque generator is a general-purpose code generator. It is intended to make code generation easy and provides all necessary ingredients like reading in the sources, possibly transforming the sources before generation, applying templates, writing the output files, and plugging code generation into your build process. Of course, you still need to write the generation templates and possibly transformators, link them together and define which templates are used for which output file.

The Torque generator is also used to generate the OM Classes and SQL for the Torque persistence framework. This part, however, is not covered in the documentation of the generator, but in the documentation of the templates.

# Features

- Different input formats can be used, currently XML and property files
- Different template languages can be used, even inside the same project and for the same output file (currently velocity and java are implemented)
- The input can be transformed before applying the generation templates.
- Output from different templates can be inserted in pre-defined mergepoints.
- Linkage of the template output is defined outside the templates, making the templates more reusable.
- Options can be used to fine-tune the outcome of the generation process.
- Variables can be defined with different scopes (template, template and children, output file, generation process)