Template Substitution Macros

Return to Introduction  Previous page  Next page

The template substitution macros correspond to the Base templates (see the Enterprise Architect User Guide). These macros result in the execution of the named template. By convention, template macros are named according to Pascal casing.

       Structure: %<TemplateName>%

where <TemplateName> can be one of the templates listed at the end of this topic.

When a template is referenced from within another template, it is generated with respect to the elements currently in scope. The specific template is selected based on the stereotypes of the elements in scope.

As noted previously, there is an implicit hierarchy among the various templates. Some care should be taken in order to preserve a sensible hierarchy of template references. For example, it does not make sense to use the %ClassInherits% macro within any of the attribute or operation templates. Conversely, the Operation and Attribute templates are designed for use within the ClassBody template.

The CTF contains the following template substitution macros: