Click here to Skip to main content
16,009,150 members
Articles / Programming Languages / C++
Article

Method Documentation Utility for Visual C++ 6

Rate me:
Please Sign up or sign in to vote.
3.33/5 (9 votes)
26 Mar 20042 min read 46.6K   947   17   6
Add-in that generate automatic documentation template for C++ methods.

General

Here is another tool to make programmers' life easier. In my article Custom Auto Complete for Visual C++6, I published a tool that does auto completion for code blocks. In this article, I bring you a tool that will place documentation for a method automatically.

This is not a new concept. The Visual Studio .NET supports this feature, but there are people who still work with the Visual C++6 environment (most of whom I know).

Description

The concept is very simple. You define a method in the H/CPP file and you want to document it. Method documentation usually consists of the following parts:

  • Description
  • Parameters description
  • Return value description

Example:

C++
//-----------------------------------------------------------
//
// Description: This method does…
//
// Return Value: bool – The return value is …
//
// Param: nF – This parameter represents …
//
// Param: nS - This parameter represents …
//
bool func(int nF, int nS)

There is a lot of text we should write before we can actually document the method. This add-in is doing it for us. All you have to do is put the cursor one line before the method like this:

C++
[Cursor Here]
bool func(int nF, int nS);

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

The Add-in extracts the method’s text. It starts with the next line after 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.

Using 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…

A Word from Me

I know some of you object the writing in VB. I am publishing ideas that may help you all in your work. The implementation language of the ideas is less important than the ideas themselves. These tools are useful no matter what language they where written with.

License

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


Written By
Web Developer
Israel Israel
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
GeneralDoxyGen Version Pin
gkelle2s18-Jun-04 6:59
gkelle2s18-Jun-04 6:59 
GeneralRe: DoxyGen Version Pin
vladfein13-Jul-04 7:30
vladfein13-Jul-04 7:30 
GeneralDoxygen Pin
Paul Selormey27-Mar-04 14:20
Paul Selormey27-Mar-04 14:20 
GeneralRe: Doxygen Pin
Ilan Shapira27-Mar-04 18:49
Ilan Shapira27-Mar-04 18:49 
GeneralRe: Doxygen Pin
Daniel Strigl28-Mar-04 18:56
Daniel Strigl28-Mar-04 18:56 
That's true! Doxygen RULES! Cool | :cool:

Regards,
Daniel.
--
FIND A JOB YOU LOVE, AND YOU'LL NEVER HAVE TO WORK A DAY OF YOUR LIFE. Wink | ;)
GeneralRe: Doxygen Pin
Ilan Shapira29-Mar-04 0:13
Ilan Shapira29-Mar-04 0:13 

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.