Book a Demo
Prev Next

Macros

Macros provide access to element fields within the UML model and are also used to structure the generated output. All macros are enclosed within percent (%) signs, as shown:

     %<macroname>%

In general, macros (including the % delimiters) are substituted for literal text in the output. For example, consider this item from the Class Declaration template:

     ... class %className% ...

The field substitution macro, %className%, would result in the current Class name being substituted in the output. So if the Class being generated was named Foo, the output would be:

     ... class Foo ...

The CTF contains a number of types of macro:

Learn more