VC语言

本类阅读TOP10

·VC++ 学习笔记(二)
·用Visual C++打造IE浏览器(1)
·每个开发人员现在应该下载的十种必备工具
·教你用VC6做QQ对对碰外挂程序
·Netmsg 局域网聊天程序
·Windows消息大全
·VC++下使用ADO编写数据库程序
·VC++学习笔记(四)
·非法探取密码的原理及其防范
·怎样在VC++中访问、修改注册表

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
vs.net下doxygen的设置与使用

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

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


相关文章

相关软件