################################################################################
##
## This is an example file for defining your own code templates.
##
## The syntax for defining code templates is:
## #TEMPLATE <template name>,<field>[=default value], <field>...
##
## The template name, the fields and their default values should be defined
## within quotes if they contain, for example space characters, equal signs,
## or comma characters.
## Use "&" in front of a letter to make the letter become a shortcut,
## which means that you can use ALT+<letter> to select the template or jump
## to the field in the dialog box.
##
################################################################################
#TEMPLATE "if"
if( %c ){
}
#TEMPLATE for,"&End Value"=10,&Variable=i
for(int %2 = 0; %2 < %1; ++%2){
%c
}
#TEMPLATE switch
switch( %c ){
case 0:
break;
default:
break;
}
#TEMPLATE class,"Class &name",&Description=--
//******************
//
// CLASS: %1
//
// DESCRIPTION:
// %2
//
class %1
{
%1();
~%1();
%c
};
#TEMPLATE "&File_Declare>Head_File_Declare","&File Name",&Description,&Version,&Created="Gzz",&date="$DATE$",&Built="$TOOLKIT_DIR$"
/***********************************************************
*
* Copyright (C), 2013, Zjut Image Processing Lab .
*
* FileName:%1
* Author: Gzz Version : %3 Date: %5
* Description: %2
* Function List:
1. main
* Others:
* Modification History:
<author> <time> <version > <desc>
***********************************************************/
#TEMPLATE "&File_Declare>&Source_File_Declare","&File Name",&Description,&Version,&Created="Gzz",&date="$DATE$",&Built="$TOOLKIT_DIR$"
/***********************************************************
*
* Copyright (C), 2013, Zjut Image Processing Lab .
*
* FileName:%1
* Author: Gzz Version : %3 Date: %5
* Description: %2
* Function List:
1. main
* Others:
* Modification History:
<author> <time> <version > <desc>
***********************************************************/
#TEMPLATE "Usual_Macro>&ifndef","File &Name"
#ifndef _H_%1_H
#define _H_%1_H
#ifdef __cplusplus
extern "C"{
#endif
%c
#ifdef __cplusplus
extern "C"}
#endif
#endif // _H_%1_H
#TEMPLATE &Function>&Main,&name=Main,&Created="$DATE$"
/************************************************************
* Function: %1
* Description: The main function,the start entry of program !
* Calls:
* Author: Gzz Build_Date:%2
* Others:
************************************************************/
void main(void)
{
%c
while(1){
};
}
#TEMPLATE &Function>&Function,"Function &name","Input ¶meter","Return ¶meter_type",&Description=--,&Created_time="$DATE$"
/************************************************************
* Function: %1
* Description:
* Input parameter: %2
* Return parameter: %3
* Calls:
* Called by:
* Author: Gzz Build_Date:%5
* Other:
*************************************************************/
%3 %1(%2)
{
%c
}
IAR常用Edit模板举例
最新推荐文章于 2022-10-28 17:21:47 发布