Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,233 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,773 people online right now. Registration is fast and FREE... Join Now!




Documenting Class Methods

 
Reply to this topicStart new topic

Documenting Class Methods, Classes

Umbrella
14 Mar, 2007 - 03:21 PM
Post #1

New D.I.C Head
*

Joined: 13 Oct, 2006
Posts: 49


My Contributions
Hello!
My question is difficult to explain so I will give an example.

ListClass::NextPos()
{
//Moves to the next element in the list
}

When I access the method in the client code,

List.NextPos() I want it to show the documentation when I highlight over one of the methods I can choose from. Usually, It shows documentation but its never matches up. My question is, where do I put the documentation in my classes so the documentation shows up in the little pop up menu. Also, is there a way i could just highlight the documentation and the code and bind them together?

Thanks!

This post has been edited by Umbrella: 14 Mar, 2007 - 03:22 PM
User is offlineProfile CardPM
+Quote Post

NickDMax
RE: Documenting Class Methods
15 Mar, 2007 - 01:41 AM
Post #2

2B||!2B
Group Icon

Joined: 18 Feb, 2007
Posts: 2,859



Thanked: 50 times
Dream Kudos: 550
My Contributions
This depends upon your IDE. To my knowledge, most ide's don't use comments to generate those neat little popups which tell you the declaration information. The information for those comes directly from the declarations at the begining of your file (or from an included header file). If you want to make those popups more helpful then use more discriptive variable names, apart from that I don't know.

Some IDEs do have an "object browser" function which allows your to look at classes and generally there is a little "discription" of each member. I don't have any clue as to how that information gets there. (I know in VB6 you can add these comments but I am not aware of where they might come from or go to in a C/C++ file, though I assume there must be a way.) I don't belive that these little discriptions ever come up as popups in an ide.

There are other source control programs which mimic javadocs and allow you to insert comments which are extracted to create a documentation "man-page" from your code. These are very nice if you have the time and patiencs to add these enlightening comments. It is nice to generate both the library and the documentation all with the click of one button. But to my knowledge this information does not help produce popups in the ide.

Basicly I think you just have to work with your declarations.
User is offlineProfile CardPM
+Quote Post

Umbrella
RE: Documenting Class Methods
17 Mar, 2007 - 02:07 PM
Post #3

New D.I.C Head
*

Joined: 13 Oct, 2006
Posts: 49


My Contributions
QUOTE(NickDMax @ 15 Mar, 2007 - 02:41 AM) *

This depends upon your IDE. To my knowledge, most ide's don't use comments to generate those neat little popups which tell you the declaration information. The information for those comes directly from the declarations at the begining of your file (or from an included header file). If you want to make those popups more helpful then use more discriptive variable names, apart from that I don't know.

Some IDEs do have an "object browser" function which allows your to look at classes and generally there is a little "discription" of each member. I don't have any clue as to how that information gets there. (I know in VB6 you can add these comments but I am not aware of where they might come from or go to in a C/C++ file, though I assume there must be a way.) I don't belive that these little discriptions ever come up as popups in an ide.

There are other source control programs which mimic javadocs and allow you to insert comments which are extracted to create a documentation "man-page" from your code. These are very nice if you have the time and patiencs to add these enlightening comments. It is nice to generate both the library and the documentation all with the click of one button. But to my knowledge this information does not help produce popups in the ide.

Basicly I think you just have to work with your declarations.

Thanks for your time and help! smile.gif
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 03:43PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month