为什么doxygen注释规范不能run

Visual Studio .NET的Doxygen 插件 - KingTools:
Introduction
As good as Visual Studio .NET is, I still miss some features in it. But MS knew that they couldn't fulfill every wish so they provided a way to write addins. That's what I've done. Sure, most of the functions in my Tools could also be done with macros, but I wanted them all packed together with an installer.
Run Doxygen
Insert Doxygen comments
Build Solution stats
Dependency Graph
Inheritance Graph
Swap .h&-&.cpp
#region/#endregion for c++
Search the web
Run Doxygen
This command first pops up a dialog box in which you can configure the output Doxygen should produce. For those who don't know Doxygen: it's a free tool to generate source documentations. It can produce documentation in different formats like html and even windows help format! See
for details. Since the dialog box doesn't offer all possible settings for doxygen, you can always edit the file Doxyfile.cfg manually which is created the first time you run it. All settings in that file override the settings you enter in the dialog box.
If you set Doxygen to generate html output, the resulting index.html is opened inside the IDE. A winhelp output (index.chm) will be opened outside the IDE.
The command available from the Tools menu builds the documentation for the whole solution. If you don't want that for example if you have several third party projects in your solution then you can build the documentation also for single projects. To do that the KingsTools add a command to the right click menu in the solution explorer.
If you want to update Doxygen to a newer version (as soon as one is released) simply overwrite the doxygen.exe in the installation directory. The same applies to the dot.exe.
TODO: find a way to integrate the generated windows help file into VS help.
Insert Doxygen comments
Doxygen needs comments that follow certain conventions to build documentation from. This part of the tools inserts them for you. Either from the right click menu in the code editor window or from the submenu under Tools-&Kings Tools. Just place the caret over a method or class header. The inserted comment for a method or function would look like this:
BOOL myfunction(int one, int two, int three);
You now have to simply insert a description in the second comment line and descriptions for each parameter of the function/method. And of course a description of the return value.
You can customize the function comments by editing the files &functionheadertop.txt&, &functionparams.txt& and &functionheaderbottom.txt&. Please read the comments inside those files on how to do that. If you don't want to change the function comments for all your projects then you can place any of those files into your project directory (that way it will be used for your project) or inside the folder of your source files (that way it will be used only for the files inside that specific folder).
The inserted comment for a class looks like this:
class CRegBase
The '/ingroup projectname' means that the class is inside the project 'projectname'. That statement helps Doxygen to group classes together. Insert the description of the class right after that statement. If you want to include pictures to illustrate the class, use '/image html &picture.jpg&'. For more helpful tags you can use please check out the Doxygen website. The '/par requirements' section you have to modify yourself to fit the truth of your class. It's not necessary for Doxygen, but I found it very useful to give that information inside a class documentation. The name after the '/author' tag is the currently logged in user. Maybe you want to change that too to include an email address.
You can customize the class comments by editing the file &classheader.txt& Please read the comments inside that file on how to do that. If you don't want to change the class comments for all your projects then you can place that files into your project directory (that way it will be used for your project) or inside the folder of your source files (that way it will be used only for the files inside that specific folder).
The last few tags should be self-explanatory. Under the line '/version' I usually insert short descriptions of what changed between versions.
Build Solution stats
This is a simple line counter. It counts all the lines of all files in your solution, grouped by projects. The generated html file with the counted lines (code, comments, empty) is then opened in the IDE. Since I haven't found a way to add a file directly to a solution and not to a project the file is just opened for view in the IDE.
Dependency and Inheritance graph
These two commands build graphs of the class relations in your solution. See my
about this. The difference to my old tool is that it now generates graphs for all projects in the solution and puts all the graphs in one single html page.
Swap .h&-&.cpp
This is something a simple macro could also do: it swaps between header and code files. For better accessibility it also is on the right click menu of the code editor. Really nothing special but it can be useful sometimes.
This tool goes through all files of the current solution and looks for class, function and macronames. It then writes them to a usertype.dat file, makes the IDE to read that file and deletes it again. After you run this tool, all class, function and macronames of your solution appear colored in the code editor. Default color is the same color as normal keywords, but you can change that under Tools-&Options, in the Options dialog select Environment-&Fonts and Colors.
If you don't want the colors anymore, just run the command 'disable coloring' and everything will be in normal colors again. I didn't want to overwrite some possible usertype.dat file already created by some user so the tool simply creates a temporary usertype.dat file instead. If you want to have the colors again the next time the IDE starts, you either have to rerun the command (doesn't take very long to execute) or change the code of the tool yourself.
Have you ever wrote a bunch of code which looked like this:
Ok, I admit this isn't a very good style of programming, but sometimes it can't be avoided. And in those cases the code is horrible to read because you don't know which closing brace belongs to which opening statement without scrolling or using the macro 'Edit.GotoBrace' several times. This tool provides a function which inserts comments after the closing brace automatically. The code snippet above would look like this:
Comments are only inserted for closing braces of if, while, for and switch statements.
If you don't want to insert comments automatically while editing, you can turn off this function. If you just don't want those comments at specific places you have to move the caret either upwards (instead of downwards which happens if you press enter) or click with the mouse so that the caret doesn't go to the line below the closing brace. Comments are also not inserted when the opening brace is less than two lines above.
#region/#endregion for C++
VS.NET introduced to possibility to outline portions of text in the code editor. That's a very useful feature wthat helps navigating through big bunches of code. But the outlined sections are not saved between sessions. VB and C# provide keywords to outline sections. In VB its '#Region' and '#End Region', in C# its '#region' and '#endregion'. Only for C++ MS didn't provide such keywords (at least I haven't found them yet). With this tool you can now enable that feature for C++ too. To prevent compiler errors for those who have not installed this tool I used '//#region' and '//#endregion' as the keywords. With the comment lines before the compiler won't complain. Use those keywords like this:
Whenever you open a document with such keywords the tool will automatically create outlining sections. The section are also created when you type the '//#endregion' keyword and a matching '//#region' is found. As you can see, you can easily nest the sections. The code above would then look like this:
This function can't be deactivated. If you don't want it, simply don't use those keywords :)
Search the web
These two small addons perform a simple web site search either in the google groups or on CP. Select a piece of text in the code editor, right click to pop up the menu and then select where to search for the selected text. That's all. The search results will be opened inside VS.NET.
To install the tools, just double-click the *.msi file and follow the instructions. If the tools are not automatically activated the next time you start the IDE, then please activate them under Tools-&Add-In Manager. Make sure you select both the addin and the box 'startup'.
All additional files needed for the tools are also packed in the installer, including Doxygen and the dot files. So you don't have to grab them separately from the web.
Full source code is provided with these tools. The addin is written in VB.NET cause first there was just one simple tool that I wanted immediately - and VB is good enough for that. Then the tool grew and I added more functions. So the code is surely not the best example for good programming (no plan, no structure -& chaos). But maybe it might still be of interest for those who want to write their own addins. It shows a way to create submenus and how to add a toolbar.
本文已收录于以下专栏:
相关文章推荐
/?scid=zh-317109&spid=1108&sid=152
使用 Microsoft Visual Ba...
安装准备首先安装asp.net mvc core项目模板,没有安装之前创建项目的时候看到的是这个样子
点击确定即可开始下载安装包,写此文章的时候自动下载的版本是
DotNetCore.1.0.1-...
本文讲述了 minidumps 是怎样工作的、当你的程序崩溃的时候应该如何生成它们、以及如何在 Visual Studio .NET 中将它们重新读入。
原文作者:Andy Pennell
The Platform Target is an often overlooked option in the build configuration for Visual Studio 2005 ...
这里记录如何使用Visual Studio的内置单元测试准备示例
创建单元测试项目
添加项目引用
添加单元测试
第一个单元测试
添加其他单元测试
运行单元测试并发现错误
测试并修正代码准备示...
从Visual Studio 2012开始,微软就把自家原来的安装与部署工具彻底废掉了,转而让大家去安装使用第三方的打包工具“InstallShield Limited Edition for Vis...
一、条件编译的基本知识
Msdn关于条件编译的说明:
可以使用条件编译选择特定的代码节进行编译,而排除其他代码节。例如,可能需要编写调试语句来比较同一编程任务的不同方法的速度,或者可能需要本地化用...
1.新建一个项目
  (1)直接在VS开始界面上选择“新建项目
  (2)在菜单上选择“文件”、“新建”、“项目”
2.在弹出的窗口中选择“Visual C#”---&“Web”---...
他的最新文章
讲师:AI100
讲师:谢梁
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)doxygen的维基介绍:
Doxygen是一个编写软件参考文檔的工具。该文檔是直接写在源代码中,因此比较容易保持更新。Doxygen可以交叉引用文檔和源代码,使文件的读者可以很容易地引用实际的源代码。
ns3的官方也有doxygen生成的文档,参见:
但是由于网络或者其它原因,我们有本地离线访问的需求,于是doxygen就派上用场了。下面来看看怎么使用doxygen:
1. 官方的方法如下:
ns-3 requires Doxygen version 1.5.4 or greater to fully build all items, although earlier versions of Doxygen will mostly work.
Type &./waf --doxygen& or &./waf --doxygen-no-build& to build the documentation. The doc/ directory contains configuration for Doxygen (doxygen.conf) and main.h. The Doxygen build process puts html files into the doc/html/ directory, and latex filex into the doc/latex/ directory.
也就是我们使用命令:
./waf --doxygen即可。
2. 使用上面命令报错:
waf configure did not detect doxygen in the system -& cannot build api docs需要做两个工作:
(1)安装doxygen:
sudo apt-get install doxygen
(2)重新配置waf,这个步骤参见谷歌的ns3论坛:
./waf configure --enable-examples --enable-tests然后我的配置还遇到一个问题:
AttributeError: 'BuildContext' object has no attribute 'add_subdirs'我曾经添加了一个模块--vanet-highway,估计是这个模块的问题,找到报错的那个语句,目前注释掉这个语句。
3. 再次使用步骤1的命令来生成文档,我的生成目录是:/home/zy/code/NS3/ns3/ns-3.20/doc/html
怎么使用这个文档? 两种方法:
(1) 文件浏览器:但是由于文件太多,文件浏览器会一直加载文件,这时点击右下方的叉叉可以停止加载,然后用浏览器打开一个就可以了,效果如下:
(2) 终端打开,终端不用加载啦。先看一下到底生成了多少个文件:
zy@zy:~/code/NS3/ns3/ns-3.20/doc/html$ ls -lR | grep &^-& | wc -l
这么多文件,怪不得加载这么久了。然后使用命令,用浏览器打开即可:
google-chrome aodv*.html
参考帖子:
本文已收录于以下专栏:
相关文章推荐
安装配置好ns3后,转到/ns-allinone-3.13/ns-3.13(或ns-3.14.1)目录,并在终端中输入&./waf --doxygen& 或者 &./waf --doxygen-no-...
在使用NS3的过程中,肯定要查看NS3的帮助文件,查询API的用法。NS3官网上有很全面的帮助文档,但是官网的连接速度非常慢,因此需要寻找一种离线阅读NS3帮助文件的方案。因此,笔者在网上搜索到了离线...
doxygen的维基介绍:
view plain
Doxygen是一个编写软件参考文檔的工具。该文檔是直接写在源代码中,因此比较容易保持更新。Dox...
本来想下载一个dash来用一下,结果它只有mac版本,没有windows版,遂使用zealzeal官网:https://zealdocs.org/文档地址:/docs...
文章来自:/text21.html
按照约定的格式注释源代码,用工具处理注释过的源代码产生文档。通过这种方式产生文档至少有以下好处:
你有为软件编写说明文档的苦恼吗?当别人甩给你一个庞大的系统,让你根据里面的代码注释理解后写出一份完整的开发文档,你会怎么办?一个个的看代码然后耗时N天来写吗?这既是一份苦差事也极其耗时,有没有更好的办...
使用doxygen生成中文文档,并根据JavaDoc风格注释生成相应的文档说明。
他的最新文章
讲师:AI100
讲师:谢梁
您举报文章:
举报原因:
原文地址:
原因补充:
(最多只允许输入30个字)}

我要回帖

更多关于 doxygen 使用 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信