代码模板
使用代码生成模板添加自定义代码前注,重新排列数据和函数,并在生成的代码文件中插入其他代码段和文档。
主题
- Customize Code Organization and Format
Customize the organization and formatting of generated code using custom file processing (CFP) tools.
- 代码生成模板 (CGT) 文件
代码生成模板 (CGT) 文件定义生成的源代码和头文件的顶级组织和格式。CGT 文件具有以下应用:
- Custom File Processing Templates
Impose a simple structure on the code generation processing using a custom file processing (CFP) template.
- 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.
- 自定义生成的文件名
使用文件命名规则自定义生成的文件名。
- 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..
- Template Symbols and Rules
Overview of template symbols and rules for using them.
