Click here to Skip to main content
12,953,937 members (43,420 online)
Click here to Skip to main content
Add your own
alternative version


19 bookmarked
Posted 24 Jun 2004

Improved Method Documentation for Visual C++

, 24 Jun 2004
Rate this:
Please Sign up or sign in to vote.
Customizable method documentation generator


    In my previous documentation article Method Documentation Utility for Visual C++ 6 I received comments that the Add-in does not support Doxygen format. The truth is that it didn’t support any format, it was totally hard coded.

    This new Add-in gives the user the option to decide his own format for the documentation using a simple configuration screen. The default format will be Doxygen.


    Like the previous Add-in, here you will be able to press a toolbar button (or any shortcut key you assigned to it) and a skeleton for documentation will appear above the method/function. The documentation will contain the following parts:

    • General – general description of the method
    • Return value – explain what will be the return value
    • Parameter – any parameter can be documented
    • See also – reference for another method or parts in the code
    • Documentation start – beginning of documentation
    • Documentation end – end of documentation

    The Doxygen format which most of you know and it’s the default format for the Add-in look like this: <PRE lang=c++>//! Method description /*! \param nF - description \param nS - description \return bool - description \sa func2() */ bool func(int nF, int nS);

    There are other formats but I chose this one because I am used to it.

    All you have to do to generate the documentation is to put the cursor one line before the method or on the same line as the method like this:

    <PRE lang=c++>[Cursor Here] bool func(int nF, int nS);

    Then press the Add-in's left button or your selected keyboard shortcut.

    The Add-in extracts the method’s text. It starts with the next line of the cursor and collects the text until it reaches ‘)’. It then parses the text. Currently I am parsing only the return value and the parameters list. If any need for additional information like: virtual/const will arise it will be added to the tool.

    Customizing The Documentation

    The customization dialog looks like this:

    Sample Image - MethodDoc2.jpg

    To reach this screen, just press the right button of the addin.

    Here you can change the template of the documentation. It is based on tags, each tag represents a different element in the documentation:

    Parameter, returned value...

    To change the value of a tag just select the tag and enter your own text in the textbox at the buttom. The right box shows you an example of how the documentation will look like.

    Installing the Add-in

    To install the binary and use it under Visual C++ 6 please read the Readme.txt file added in both zip files

    The code was tested under Windows2000/XP only and it may work under windows 98 but who knows for sure…


    This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

    A list of licenses authors might use can be found here


    About the Author

    Ilan Shapira
    Web Developer
    Israel Israel
    No Biography provided

    You may also be interested in...


    Comments and Discussions

    QuestionVC++ 2005 Pin
    Dean DSA10-Nov-06 11:47
    memberDean DSA10-Nov-06 11:47 
    Generaladvanced param parsing Pin
    Michael Schoenherr27-Jun-04 19:05
    sussMichael Schoenherr27-Jun-04 19:05 
    GeneralRe: advanced param parsing Pin
    Ilan Shapira27-Jun-04 20:15
    memberIlan Shapira27-Jun-04 20:15 
    GeneralRe: advanced param parsing Pin
    peterchen27-Jun-04 22:33
    memberpeterchen27-Jun-04 22:33 
    GeneralRe: advanced param parsing Pin
    Ilan Shapira28-Jun-04 7:46
    memberIlan Shapira28-Jun-04 7:46 
    GeneralMethod Documentation Util Pin
    Veena Katti27-Jun-04 9:57
    memberVeena Katti27-Jun-04 9:57 
    GeneralRe: Method Documentation Util Pin
    Ilan Shapira27-Jun-04 10:24
    memberIlan Shapira27-Jun-04 10:24 
    GeneralRe: MSXML Pin
    allting15-Sep-05 4:48
    memberallting15-Sep-05 4:48 
    GeneralSuggestion Pin
    Hans Dietrich26-Jun-04 14:28
    memberHans Dietrich26-Jun-04 14:28 
    GeneralRe: Suggestion Pin
    Ilan Shapira27-Jun-04 9:37
    memberIlan Shapira27-Jun-04 9:37 
    GeneralRe: Suggestion Pin
    vladfein28-Jun-04 7:36
    membervladfein28-Jun-04 7:36 
    GeneralFiles where uploaded Pin
    Ilan Shapira26-Jun-04 5:30
    memberIlan Shapira26-Jun-04 5:30 
    GeneralBoth download links are broken Pin
    Hans Dietrich25-Jun-04 15:40
    memberHans Dietrich25-Jun-04 15:40 
    GeneralRe: Both download links are broken Pin
    Ilan Shapira26-Jun-04 4:21
    memberIlan Shapira26-Jun-04 4:21 
    GeneralRe: Both download links are broken Pin
    mkcx29-Jun-04 0:43
    membermkcx29-Jun-04 0:43 
    GeneralRe: Both download links are broken Pin
    Ilan Shapira29-Jun-04 1:59
    memberIlan Shapira29-Jun-04 1:59 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    Permalink | Advertise | Privacy | Terms of Use | Mobile
    Web02 | 2.8.170525.1 | Last Updated 25 Jun 2004
    Article Copyright 2004 by Ilan Shapira
    Everything else Copyright © CodeProject, 1999-2017
    Layout: fixed | fluid