• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            Beginning to 編程

            VC++ 方面編程文章

             

            Doxygen 源代碼文檔自動生成器的使用筆記

            ?

            google 上搜了很久的關于 Doxygen 使用方法的咚咚,只不過都是英文,而且都很多的規則。實際上大家只需要告訴基本的規則就可以。下面是我對 Doxygen 的摸索

            ?

            首先熟知 Doxygen 產生的文件的基本結構 ( Html 1.4.6 為例 )

            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 2006-3-23

            ?

            ~ \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 2006-3-23

            ?

            * <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 2006-3-23

            ?

            * <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 2006-3-23

            ?

            * <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)

            {

            ?

            }


            o_1.PNG??

            ?

            下面是 Doxygen 的主要操作步驟

            首先我們在 MainPage 中看到 ProjectName ProjectVersion (在 Doxygen Wizhard Step1

            中輸入就可以啦 )

            ?? ?

            ?

            ? o_2.PNG

            ?

            ?

            ?

            ?

            ?

            ?

            ?

            ?

            ?

            ?

            ?

            ?

            然后在 Step2

            中選擇保存文件的位置

            ?

            Step3 選擇工作目錄

            Step4 點擊 Start 按鈕, ok 完成。

            打開輸出文件的位置。 Html 文件就生成拉。

            posted on 2006-03-23 22:32 Beginning to 編程 閱讀(18247) 評論(4)  編輯 收藏 引用 所屬分類: 心得體會

            評論

            # 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用起來是很方便, 但想要達到自己所設想的樣式很難, 它里面的選項太多了, 都難完全搞懂  回復  更多評論   

            # re: Doxygen 源代碼文檔自動生成器的使用筆記 2009-05-03 12:47 創意產品

            不錯  回復  更多評論   

            導航

            統計

            常用鏈接

            留言簿(4)

            隨筆分類

            隨筆檔案

            文章檔案

            相冊

            BlogDev

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            欧美精品久久久久久久自慰| 久久九九亚洲精品| 久久婷婷国产剧情内射白浆 | 国产成人无码久久久精品一| 日韩精品久久无码人妻中文字幕 | 久久久网中文字幕| 久久人人爽人人爽人人爽| 77777亚洲午夜久久多喷| 久久综合给合综合久久| 精品亚洲综合久久中文字幕| 久久久久亚洲AV成人网人人软件 | 久久亚洲中文字幕精品一区四| 亚洲伊人久久成综合人影院 | 久久99热这里只有精品国产| 欧美丰满熟妇BBB久久久| 91精品国产综合久久四虎久久无码一级 | 区亚洲欧美一级久久精品亚洲精品成人网久久久久 | 久久精品成人一区二区三区| 久久久久成人精品无码中文字幕 | 99热都是精品久久久久久| 精品久久久久久国产| 精品久久综合1区2区3区激情| 国内精品久久久久影院优| 伊人久久大香线蕉综合热线| 久久性精品| 日韩影院久久| 日日狠狠久久偷偷色综合0| 久久综合成人网| 久久这里的只有是精品23| 性高朝久久久久久久久久| 日韩美女18网站久久精品| 色播久久人人爽人人爽人人片aV| 国产精品va久久久久久久| 大蕉久久伊人中文字幕| 狠狠人妻久久久久久综合| 久久精品一区二区影院 | 亚洲精品97久久中文字幕无码| 久久国产成人| 亚洲乱码日产精品a级毛片久久| 一本一道久久a久久精品综合| 波多野结衣久久精品|