打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
vs.net下doxygen的设置与使用
来源:互联网  作者:我要购书网信息中心  发布:我要购物网收集整理  发布时间:2006-8-31 人气:86
doxygen的windows平台下的安装文件有大约5M左右,可到以下地址下载。
下载地址: http://www.stack.nl/~dimitri/doxygen/download.html#latestsrc
下载后安装完毕即可使用命令行方式或wizard产生注释文档
---------------------------------------------------------------------------------------------------------------
vs.net的集合:(可参考codeproject文章10 Minutes to document your code)
在vs.net“工具”菜单下添加外部工具“生成文档“,参数如下:
命令: c:\program files\doxygen\bin\doxygen.exe (即doxygen的安装目录)
命令参数: $(ProjectDir)\default.doxygen
初始目录: $(ProjectDir)
选中"使用输出窗口",使doxygen的输出在vs.net 的输出窗中显示。
同时拷贝default.doxygen到工作的工程目录下($(projectdir))。
根据需要可以打开修改。
使用前面的“生成文档”工具可以给工程产生html类型的文档注释,同时产生.hhp类型的html help文档的项目文件.
同时安装HTML help workshop,可以在外部工具添加一个新项目,直接调用html help workshop的主执行文件,参数
传入生成的*.hhp文件,即可直接调用编译出chm的注释文件了。
添加外部工具,用windows目录下的 hh.exe命令可以启动浏览chm文件,这样就可以不离开vs.net开发环境来完成文档的
生成与查看了。
另外:
1.doxygen不支持vs.net中的solution概念,需要拷贝default.doxygen到具体的工程目录下。
2.vs.net中的宏定义$(projectdir)有问题,直接传给html help workshop 的参数多个引号,可手工删除。
3.我编辑的一些符合doxygen注释风格的常用宏:
Sub 函数注释()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "//!"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "/*!"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.Text = "\param"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "\param"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "\return"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "\sa "
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "*/"
DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
DTE.ActiveDocument.Selection.DeleteLeft()
End Sub
Sub 变量注释()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "//!"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
DTE.ActiveDocument.Selection.DeleteLeft()
End Sub
Sub 文件注释()
DTE.ActiveDocument.Selection.Text = "/** \file " + DTE.ActiveDocument.Name + " 版权所有 (c) 2000-2004 , 我的公司"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.Text = "\n 文件名称 : " + DTE.ActiveDocument.Name
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "\n 功能描述 : "
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "\author 我的大名 "
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "\n 历史信息 : 第一版 " + Date.Now
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.DeleteLeft()
DTE.ActiveDocument.Selection.Text = "*/"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
End Sub
Sub 变量详细注释()
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "//!"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Text = "/*!"
DTE.ActiveDocument.Selection.NewLine()
DTE.ActiveDocument.Selection.Indent()
DTE.ActiveDocument.Selection.Text = "*/"
DTE.ActiveDocument.Selection.StartOfLine(vsStartOfLineOptions.vsStartOfLineOptionsFirstText)
DTE.ActiveDocument.Selection.DeleteLeft()
End Sub
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
Word VBA批量删除文本框
word宏代码集锦
VBA批量替换多个word中的特定词 | VBA实例教程
Word VBA 学习交流(二)
将word中的图片批量旋转180度(2014-05-30 17:50:43)
''''两个实用的word宏
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服