Code Templates
Customize organization and formatting of generated code
Use code generation templates to add custom code banners, rearrange data and functions, and insert additional code segments and documentation into generated code files.
Topics
Code Templates
- Customize Code Organization and Format
Customize the organization and formatting of generated code using custom file processing (CFP) tools. - Template Symbols and Rules
Overview of template symbols and rules for using them.
Code Generation Templates
- Code Generation Template Files
Define top-level organization and formatting of generated source and header files using Code Generation Template (CGT) files. - Generate Custom File and Function Banners
Specify custom file and function banners for generated code files using code generation template (CGT) files. - Change the Organization of a Generated File
Use data and code templates to change the organization of generated files.
Custom File Processing Templates
- Custom File Processing Templates
Impose a simple structure on the code generation processing using a custom file processing (CFP) template. - Generate Source and Header Files with a Custom File Processing Template
Generate a simple source (.cor.cpp) and header (.h) file using example CFP template. - Comparison of a Template and Its Generated File
Use a template to define what code the code generator adds to the generated file, control the location of code in the file, and optionally insert comments in the generated file. - Code Template API Summary
Use Code template API functions to obtain the names of the standard model files and other model-related information..
