Prev Next

Code Template Framework

When you use Enterprise Architect to generate code from a model, or transform the model, the system refers to the Code Template Framework (CTF) for the parameters that define how it should:

  • Forward engineer a UML model
  • Generate Behavioral Code
  • Perform a Model Driven Architecture (MDA) Transformation
  • Generate DDL in database modeling

A range of standard templates is available for the direct generation of code and for transformation; if you do not want to use the standard CTF configurations, you can customize them to meet your needs.

CTF Templates

Template Type

Detail

See also

Code Templates

When you forward engineer a Class model, the code templates define how the skeletal code is to be generated for a given programming language. The templates for a language are automatically associated with the language.

The templates are written as plain text with a syntax that shares some aspects of both mark-up languages and scripting languages.

Code Template Framework Tool Base Templates Code Template Syntax The Code Template Editor in MDG Development

Model Transformation Templates

Model Transformation Templates provide a fully configurable method of defining how Model Driven Architecture (MDA) Transformations convert model elements and model fragments from one domain to another.

This process is two-tiered. It creates an intermediary language (which can be viewed for debugging) which is then processed to create the objects.

Edit Transformation Templates Write Transformations Intermediary Language

Behavioral Code Generation Templates

Enterprise Architect supports user-definable code generation of the UML Behavioral models.

This applies the standard Code Template Framework but includes specific Enterprise Architect Simulation Library (EASL) code generation macros.

The Code Template Editor in MDG Development EASL Code Generation Macros

DDL Templates

DDL Templates are very similar to Code generation templates, but they have been extended to support DDL generation with their own set of base templates, macros, function macros and template options.

DDL Template Syntax

Learn more