You can call a template from a generated file or from another template by entering its name surrounded by percentage signs. Object properties, collections, and local and global variables are called in the same way. At generation time, a template call is replaced by the template content, which is then resolved to its final textual value.
Example |
---|
The %isInner% template is defined
as:
.bool (%ContainerClassifier%!=null)The %QualifiedCode% template calls the %isInner% template to test if the class is an inner class: .if (%isInner%) %ContainerClassifier.QualifiedCode%::%Code% .else %Code% .endifResult: C2::C1The %QualifiedCode% template is applied to the C1 class, which is an inner class to C2. |