Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javadoc-like Documentation for C++

Tags:

java

c++

javadoc

Are there similar documentation generation systems like Javadoc, for C++? Javadoc produces nice output; It would be great if you could use something like it in other languages.

like image 908
DHamrick Avatar asked Jul 17 '09 02:07

DHamrick


People also ask

Does C++ have a Javadoc?

Does C++ have anything similar to javadoc? Yes. Here are a few (listed alphabetically by tool name): ccdoc supports javadoc-like syntax with various extensions.

What is Javadoc style documentation?

Javadoc is a documentation tool which defines a standard format for such comments, and which can generate HTML files to view the documentation from a web broswer. (As an example, see Oracle's Javadoc documentation for the Java libraries at http://download.oracle.com/javase/6/docs/api/.)

How can you generate Javadoc documentation for your code?

Step 1 − Open eclipse, select the option Project →Generate Javadoc. Step 2 − Select the javadoc.exe file from the bin folder of java installation directory, select the destination folder for the generated java doc and select Next. finish button.

Is Javadoc still used?

Javadoc is pretty much the accepted standard for documenting java code.


2 Answers

There are several tools that works like JavaDoc for C++ The most popular tool is probably doxygen. It can handle JavaDoc-like comments, and also several languages (e.g., C++, C, Java, Objective-C, Python, PHP, C#). It has pretty good support for tweaking the style of the HTML output using CSS (see the users list for example documentations).

Two important issues when choosing the documentation system is to make sure that it allows you to

  • Document the entities that you are interested in. Do you want to document the system following the code structure or according to some other module division.
  • Getting the output formatted as you want. It is preferable when the documentation fits in with your general project style.

Our experience with doxygen is that it is pretty easy to set up and use, and the resulting output is fairly easy to tweak. Unfortunately, doxygen is not perfect, so in some cases it is necessary to work around quirks or bugs where the doxygen parser breaks down. Be sure to inspect all of your generated documentation carefully.

like image 163
Zayenz Avatar answered Sep 21 '22 17:09

Zayenz


You can't use javadoc specifically, but there are a couple of tools that do what you want. The one most people tend to use is Doxygen. Here are some links for Doxygen and Doc++:

Doxygen
Doc++

like image 30
dreadwail Avatar answered Sep 17 '22 17:09

dreadwail