Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen private function

Tags:

c++

doxygen

Is there a way to have doxygen show the documentation for individual private functions? I want doxygen to not show the documentation for the vast majority of private functions but show it for a select few private functions. My motivation is that these C++ private functions are provided to Python as extensions and I want their documentation to show up in Doxygen. However, I don't want them to be public because they are only needed by the classes themselves; they definitely belong in the private sector.

Thanks

like image 700
duffsterlp Avatar asked Aug 27 '12 18:08

duffsterlp


People also ask

How do I comment out a code in doxygen C++?

Once specified, you can generate the comment stub by typing the respective “///” or “/**” above a function, or by using the (Ctrl+/) shortcut.

Are doxygen commands case sensitive?

It is parsed by doxygen . The file may contain tabs and newlines for formatting purposes. The statements in the file are case-sensitive. Comments may be placed anywhere within the file (except within quotes). Comments begin with the # character and end at the end of the line.

How do I show code in doxygen?

You can put example source code in a special path defined in the doxygen config under EXAMPLE_PATH , and then insert examples with the @example tag. Doxygen will then generate an extra page containing the source of the example. It will also set a link to it from the class documentation containing the example tag.


1 Answers

I set the following in the config file:

EXTRACT_PRIVATE = YES

HIDE_UNDOC_MEMBERS = YES

This has the desired effect but will still show the documentation for all documented private members.

I then use @internal as the first line for the documentation of private members that I do not want to show.

Also, I can still document private members with a normal C++ comment. ie. dont use /** ... */ use /* ... */. Usually I use a normal comment for member variables.

Finally, if I really want to show all that private documentation I can set:

INTERNAL_DOCS = YES

to create a more expansive version of the documentation.

like image 166
Michael Denison Avatar answered Sep 28 '22 06:09

Michael Denison