Chapter 4 Managing Profiles


Defining Templates and Generated Files in a Profile

You now define templates and generated files in a profile, for a selected metaclass, stereotype or criterion.

What are templates and generated files?

The PowerDesigner Generation Template Language allows you to generate pieces of text for metaclasses. This generation can be helpful to output code (like JAVA or C++ code), reports (extract textual information from the model) or to produce external exchange format like XMI.

GTL is used to generate a file (called generated file) for a given metaclass and also to generate a piece of text for one metaclass that will be included in a more global file generated for another metaclass. This piece of text is called a template. It is made of plain text, mixed with variables that consist of information coming from the model itself.

A file is generated for each instance of the metaclass where it was defined. If you define a generated file for a stereotype or a criterion, a file will be generated for each instance with the correct stereotype or verifying the criterion.

For example, if you define a generated file in the model metaclass, then only one file will be generated per model. However, if you define a generated file in the class metaclass, a file will be generated for each class in the model.

For more information on the GTL syntax, see the "Generation Reference Guide" chapter.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.