转载:Doxygen 源代码文档自动生成器的使用笔记:
来源:互联网 发布:页面等待加载js插件 编辑:程序博客网 时间:2024/03/29 14:51
转载自:http://www.cppblog.com/richardzeng/archive/2006/03/23/4508.html
在 google 上搜了很久的关于 Doxygen 使用方法的咚咚,只不过都是英文,而且都很多的规则。实际上大家只需要告诉基本的规则就可以。下面是我对 Doxygen 的摸索
首先熟知 Doxygen 产生的文件的基本结构 ( 以 Html 和
Header (头部)
MainPage Files Classes
那么我们首先建立两个类吧,以典型的 Shape 和 它的继承类 Rectangle 为例
(为了表示那些是我的解释约定 ~ 为解释符号 其他的头文件和源文件的具体内容)
// shape.h
~ 在这个头文件中首先要有一些关于本文件的一些信息或者公司的 copyright 信息
~ 至于你想写什么,发挥你的创意把。
/** /file
* <pre><b>Richard Zeng Shape Class File Source</b></pre>
~ <pre></pre> 为居中显示
* <pre><b>Copyright and Use</b></pre>
* /author Richard Zeng
* /date
~ /author 和 /date 是 Doxygen 的两个关键字
/author 为作者标题
/date 为日期标题
* <pre>zengyongjoy@gmail.com</pre>
<b>All rights reserved.</b>
*/
/** class shape define
* this is the base class for all Shape
*/
~ 在 Shape 类定义的前面请加上解释,否则这个类就不会产生很重要的
class Shape{
public :
Shape();
~Shape();
virtual void Draw(CDC* pDC);
};
// shape.cpp
/** /file
* <pre><b>Richard Zeng Shape Class File Source</b></pre>
* <pre><b>Copyright and Use</b></pre>
* /author Richard Zeng
* /date
* <pre>zengyongjoy@gmail.com</pre>
<b>All rights reserved.</b>
*/
~ 上面的就不用说了吧
#include "shape.h"
~ 解释,随便你写什么都可以的
~ 这里我们可以看出在 CPP 中加注释比较好
~ 每个函数的实现都必须加上注释否则就没有这个函数拉
/** default constructor*/
Shape ::Shape()
{
}
/** destructor */
Shape ::~Shape()
{
}
/** Draw funtion for this shape
* /param CDC* pointer to MFC CDC
*/
~ /param 为 Doxygen 的关键字 用于定义参数
~ /return 为返回关键字
void Shape::Draw(CDC* pDC)
{
}
//Rectangle.h
/** /file __FILE__
* <pre><b>Richard Zeng Shape Class File Source</b></pre>
* <pre><b>Copyright and Use</b></pre>
* /author Richard Zeng
* /date
* <pre>zengyongjoy@gmail.com</pre>
<b>All rights reserved.</b>
*/
#include "shape.h"
/** Rectangle class define
*/
class Rectangle:publicShape{
public :
Rectangle();
~Rectangle();
void Draw(CDC*pDC);
private :
int width,height;
};
//Rectangle.cpp
/** /file __FILE__
* <pre><b>Richard Zeng Shape Class File Source</b></pre>
* <pre><b>Copyright and Use</b></pre>
* /author Richard Zeng
* /date
* <pre>zengyongjoy@gmail.com</pre>
<b>All rights reserved.</b>
*/
/** default constructor */
Rectangle ::Rectangle()
{
}
/** destructor */
Rectangle ::~Rectangle()
{
}
/** Draw function
* /param CDC* pointer to MFC CDC Class
*/
void Rectangle::Draw(CDC* pDC)
{
}
下面是 Doxygen 的主要操作步骤
首先我们在 MainPage 中看到 ProjectName 和 ProjectVersion (在 Doxygen Wizhard Step1
然后在 Step2
中选择保存文件的位置
Step3 选择工作目录
Step4 点击 Start 按钮, ok 完成。
打开输出文件的位置。 Html 文件就生成拉。
posted on 2006-03-23 22:32 Beginning to 编程 阅读(1296) 评论(3) 编辑 收藏 引用 所属分类: 心得体会
评论
# re: Doxygen 源代码文档自动生成器的使用笔记 2006-03-24 10:29 任我行
用过点点,写注释的时候需要掌握一些规则。
回复 更多评论
# re: Doxygen 源代码文档自动生成器的使用笔记 2006-03-24 13:19 沐枫
我以前做了一个doxygen标记的小结,希望有帮助。
http://ly4cn.cnblogs.com/archive/2005/11/23/282637.html 回复 更多评论
# re: Doxygen 源代码文档自动生成器的使用笔记 2006-03-29 12:54 lvlouisaslia
太过简单了, Doxygen用起来是很方便, 但想要达到自己所设想的样式很难, 它里面的选项太多了, 都难完全搞懂 回复 更多评论- 转载:Doxygen 源代码文档自动生成器的使用笔记:
- 源代码文档生成 Doxygen介绍(转载)
- 源代码文档生成 Doxygen介绍(转载)
- 源代码文档自动生成工具 Doxygen
- doxygen分析源代码,自动生成文档
- C++ 程序文档生成器(doxygen)用法介绍(转载)
- C++ 文档生成器介绍(doxygen)
- 源代码文档生成工具----Doxygen
- 用Doxygen生成源代码文档
- Doxygen文档生成工具的使用
- Doxygen文档生成工具的使用
- 使用Doxygen获取NS3的帮助文档
- Doxygen文档生成工具的使用
- C++ 程序文档生成器介绍(doxygen)
- C++ 程序文档生成器介绍(doxygen)
- C++ 程序文档生成器介绍(doxygen)
- C++ 程序文档生成器(doxygen)用法介绍
- C++ 程序文档生成器介绍(doxygen)
- Kernel Streaming Driver(DDK文档翻译2)- -
- 职场少走弯路的10条忠告
- 转载:DoxyGen文档之七
- 多态性(三)
- D-Day +17 of .NET 找不到合适的美工,版面设计全部得自己来,眼睛看花掉了。。
- 转载:Doxygen 源代码文档自动生成器的使用笔记:
- 要研究sniffer了
- 转载:Doxygen用户手册中文版(一)
- Kernel Streaming Driver(DDK文档翻译3)- -
- MPEG标准简介及发展
- js生成随机数字.用到那个静态页面随机变换背景图片!
- (转贴)一个中国黑客致中国黑客和红客的公开信
- 延迟签名技术步骤
- 我的股票:2007/04/06