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:
- Template Substitution Macros
- Field Substitution Macros
- Substitution Examples
- Attribute Field Substitution Macros
- Class Field Substitution Macros
- Code Generation Option Field Substitution Macros
- Connector Field Substitution Macros
- Constraint Field Substitution Macros
- Effort Field Substitution Macros
- File Field Substitution Macros
- File Import Field Substitution Macros
- Link Field Substitution Macros
- Linked File Field Substitution Macros
- Metric Field Substitution Macros
- Operation Field Substitution Macros
- Package Field Substitution Macros
- Parameter Field Substitution Macros
- Problem Field Substitution Macros
- Requirement Field Substitution Macros
- Resource Field Substitution Macros
- Risk Field Substitution Macros
- Scenario Field Substitution Macros
- Tagged Value Substitution Macros
- Template Parameter Substitution Macros
- Test Field Substitution Macros
- Function Macros
- Control Macros
- List Macro
- Branching Macros
- Synchronization Macros
- The Processing Instruction (PI) Macro
- EASL Code Generation Macros