VAX自动生成注释

来源:互联网 发布:有益网络怎么样 编辑:程序博客网 时间:2024/05/01 05:34

1、先看下注释生成的效果:

[cpp] view plaincopy
  1. /***************************************************************************** 
  2.     *  @COPYRIGHT NOTICE 
  3.     *  @Copyright (c) 2013, ChenMH 
  4.     *  @All rights reserved 
  5.  
  6.     *  @file     : TestHead.h 
  7.     *  @version  : ver 1.0 
  8.  
  9.     *  @author   : ChenMH 
  10.     *  @date     : 2013/5/17 14:56 
  11.     *  @brief    :    
  12. *****************************************************************************/  
2、再来说下使用方法:

      1)、 在主菜单中,依次选择【VAssistX->Visual AssistX Options->Advanced->Suggestions】,单击右边的Edit VA Snippets,即可进入编辑。

      2)、选中"c++"->右键->new。即可建立自定义的宏。

      3)、用的时候,在编辑器中输入你定议的Shortcut即可弹出注释补全框。如我的Shortcut是cmh。

      如下图:

      

      下面是我用到的宏:

[cpp] view plaincopy
  1. /***************************************************************************** 
  2.     *  @COPYRIGHT NOTICE 
  3.     *  @Copyright (c) 2013, ChenMH 
  4.     *  @All rights reserved 
  5.  
  6.     *  @file     : $FILE_BASE$.$FILE_EXT$ 
  7.     *  @version  : ver 1.0 
  8.  
  9.     *  @author   : ChenMH 
  10.     *  @date     : $YEAR$/$MONTH$/$DAY$ $HOUR$:$MINUTE$ 
  11.     *  @brief    : $brief$ 
  12. *****************************************************************************/  

3、Edit VA Snippets用到的宏

[cpp] view plaincopy
  1.  1Date  
  2.  2 $DATE$ Year/month/day formatted as %04d/%02d/%02d  
  3.  3 $DAY$ Day of month formatted as %d  
  4.  4 $DAY_02$ Day of month formatted as %02d  
  5.  5 $DAYNAME$ Three-character abbreviation of day  
  6.  6 $DAYLONGNAME$ Full name of day  
  7.  7 $MONTH$ Month formatted as %d  
  8.  8 $MONTH_02$ Month formatted as %02d  
  9.  9 $MONTHNAME$ Three-character abbreviation of month  
  10. 10 $MONTHLONGNAME$ Full name of month  
  11. 11 $YEAR$ Year formatted as %d  
  12. 12 $YEAR_02$ Year formatted as %02d  
  13. 13Time   
  14.    $HOUR$ Hour formatted as %d  
  15. 14 $HOUR_02$ Hour formatted as %02d  
  16. 15 $MINUTE$ Minute formatted as %02d  
  17. 16 $SECOND$ Second formatted as %02d  
  18. 17File  
  19. 18 $FILE$ Full filename with path*  
  20. 19 $FILE_UPPER$ Full filename with path in uppercase*  
  21. 20 $FILE_BASE$ Filename without path or extension*  
  22. 21 $FILE_BASE_UPPER$ Filename without path or extension in upper case*  
  23. 22 $FILE_EXT$ Filename extension*  
  24. 23 $FILE_EXT_UPPER$ Filename extension in upper case*  
  25. 24 $FILE_PATH$ Path of file*  
  26. 25 $FILE_PATH_UPPER$ Path of file in upper case*  
  27. 26General  
  28. 27 $clipboard$ Current clipboard  
  29. 28 $end$ Position of caret after expansion  
  30. 29 $selected$ Current selection**  
  31. 30 $$ Literal '$' character  
  32. 31Symbol Context  
  33. 32 $MethodName$ Name of containing method  
  34. 33 $MethodArgs$ Method parameters  
  35. 34 $ClassName$ Name of containing class  
  36. 35 $BaseClassName$ Name of base class of containing class  
  37. 36 $NamespaceName$ Name of innermost containing namespace  
  38. 37GUID  
  39. 38 $GUID_DEFINITION$ Generated GUID formatted for use in a definition  
  40. 39 $GUID_STRING$ Generated GUID formatted for use in a string  
  41. 40 $GUID_STRUCT$ Generated GUID formatted for use in a struct  
  42. 41Refactor  
  43. 42 $GeneratedPropertyName$ Property name generated during Encapsulate Field  
  44. 43 $MethodArg$ One parameter of the method and its type  
  45. 44 $MethodArgName$ One parameter of the method  
  46. 45 $MethodArgType$ Type of one parameter of the method  
  47. 46 $MethodBody$ Body of implementation  
  48. 47 $MethodQualifier$ Optional qualifiers of method  
  49. 48 $ParameterList$ Parameters separated by commas  
  50. 49 $SymbolContext$ Context and name of method  
  51. 50 $SymbolName$ Name of method  
  52. 51 $SymbolPrivileges$ Access of method  
  53. 52 $SymbolStatic$ Keyword static or blank  
  54. 53 $SymbolType$ Return type of method  
  55. 54 $SymbolVirtual$ Keyword virtual or blank   

4、官方网站http://www.wholetomato.com/products/features/vasnippets.asp
0 0
原创粉丝点击
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 很深的川字纹怎么办 dns被劫持怎么办 手机 职工发生工伤后怎么办 做acm看不懂题目怎么办 12岁洗澡发烧怎么办 word转pdf乱码怎么办? 花生油炸糊了怎么办 熟鸡肉很腥怎么办 鸡肉稍微有点味怎么办 新鲜鸡肉有点臭怎么办 手机屏幕自己乱点怎么办 电脑开机出现f1f2怎么办 普通话证书身份证号有误怎么办 湖南身份证在深圳怎么办 超市快过期东西怎么办 超市打碎了东西怎么办 毕业证与身份证号不符怎么办 家里电路坏了怎么办 深圳户口没房怎么办 深圳租凭合同怎么办 房屋续租水电费怎么办 二手房买到凶宅怎么办 公租房退休之后怎么办 深圳公务员无房怎么办 深圳安居房回执遗失怎么办 社保网注册不了怎么办 深圳怎么办少儿医保卡 少儿没缴纳医保怎么办 上海辞职后社保怎么办 辞职去上学社保怎么办 辞职后异地社保怎么办 个人不想交社保怎么办 离职去异地社保怎么办 离职到外省社保怎么办 辞职去外省社保怎么办 永康光伏补贴怎么办? 找到工作后档案怎么办 夫妻离婚后户口怎么办 异地档案辞职后怎么办 去网吧没有招聘怎么办 建筑工地老板不给钱怎么办