이 페이지는 기계 번역을 사용하여 번역되었습니다. 최신 내용을 영문으로 보려면 여기를 클릭하십시오.
코드 템플릿
코드 생성 템플릿을 사용하면 사용자 지정 코드 배너를 추가하고, 데이터와 함수를 재배열하고, 생성된 코드 파일에 추가 코드 세그먼트와 문서를 삽입할 수 있습니다.
도움말 항목
- Customize Code Organization and Format
Custom file processing (CFP) tools allow you to customize the organization and formatting of generated code.
- Code Generation Template (CGT) Files
Code Generation Template (CGT) files define the top-level organization and formatting of generated source code and header files.
- Custom File Processing (CFP) Templates
A custom file processing (CFP) template imposes a simple structure on the code generation process.
- Specify Templates For Code Generation
Create CGT files and CFP templates to use custom file processing features.
- Generate Custom File and Function Banners
Using code generation template (CGT) files, you can specify custom file banners and function banners for the generated code files.
- Change the Organization of a Generated File
Use data and code templates to change the organization of generated files.
- Customize Generated File Names
Customize generated file names by using file naming rules.
- Generate Source and Header Files with a Custom File Processing (CFP) Template
This example shows you the process of generating a simple source (
.c
or.cpp
) and header (.h
) file using the example CFP template. - Comparison of a Template and Its Generated File
You can 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
The code template API includes functions to obtain the names of the standard model files and other model-related information.
- Template Symbols and Rules
This topic describes template symbols and rules for using them.