• <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 編程 閱讀(18222) 評論(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

            搜索

            最新評論

            閱讀排行榜

            評論排行榜

            国产午夜久久影院| 久久se精品一区精品二区国产| 要久久爱在线免费观看| 久久99九九国产免费看小说| 久久久久亚洲AV无码专区首JN| 亚洲精品无码久久久影院相关影片| 久久综合噜噜激激的五月天| 久久亚洲欧美日本精品| 久久亚洲精品国产亚洲老地址| 精品久久久久久久久午夜福利| 手机看片久久高清国产日韩| 国产精品无码久久综合| 色综合久久88色综合天天 | 成人久久综合网| AV无码久久久久不卡蜜桃| 久久高清一级毛片| 久久ZYZ资源站无码中文动漫| 香蕉久久AⅤ一区二区三区| 国产精品99久久久久久人| 欧美日韩久久中文字幕| 久久久久久极精品久久久| 精品久久久久久久久中文字幕| 久久久久亚洲AV成人网人人网站| 久久av高潮av无码av喷吹| 精品久久久久中文字幕日本| 亚洲精品乱码久久久久久自慰| 久久影院午夜理论片无码| 久久久久亚洲av无码专区喷水| 久久福利资源国产精品999| 国产成人久久777777| 久久ZYZ资源站无码中文动漫| 天天爽天天狠久久久综合麻豆| 久久人人爽人人爽人人片AV东京热| 久久久久免费视频| 久久无码一区二区三区少妇| 99久久亚洲综合精品成人| 亚洲国产成人久久精品动漫| 国产精品99久久精品爆乳| 免费一级欧美大片久久网| 久久夜色撩人精品国产| 色婷婷噜噜久久国产精品12p |