This method to document the fields of a struct does not work for me:
typedef struct wigrec {
/** next entry in list */ wigptr next;
...
However this does:
typedef struct wigrec {
/// next entry in list
wigptr next;
...
I prefer the first form, because it keeps it all on one line. I use /** opening comment several other places in my program with no issue, its just in a struct that it does not work. According to the online manual it should work:
https://www.doxygen.nl/manual/docblocks.html
What am I missing here?
Information on doxygen:
samiam@samiam-h-pc-2:~/projects/petit_ami$ doxygen -v
1.8.17
samiam@samiam-h-pc-2:~/projects/petit_ami$ doxygen -x petit_ami.dox
# Difference with default Doxyfile 1.8.17
PROJECT_NAME = test
PROJECT_BRIEF = "Test of doxygen"
OUTPUT_DIRECTORY = test_html
ABBREVIATE_BRIEF =
OPTIMIZE_OUTPUT_FOR_C = YES
LOOKUP_CACHE_SIZE = 1
EXTRACT_ALL = YES
EXTRACT_STATIC = YES
CASE_SENSE_NAMES = NO
INPUT = test.c
FILE_PATTERNS =
EXCLUDE = glibc
EXAMPLE_PATTERNS =
USE_MDFILE_AS_MAINPAGE = doxmain.txt
SOURCE_BROWSER = YES
HTML_TIMESTAMP = YES
GENERATE_TREEVIEW = YES
MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest
GENERATE_LATEX = NO
LATEX_CMD_NAME = latex
CALL_GRAPH = YES
CALLER_GRAPH = YES
Program:
struct {
/** this is a test field */ int a;
int b;
int c;
} mystruct;
int main()
{
}
Alternate program:
struct {
/// this is a test field
int a;
int b;
int c;
} mystruct;
int main()
{
}
And that result:
For program:
/** This is a test structure */
struct {
/// this is a test field
int a;
int b;
int c;
} mystruct;
int main()
{
}
Doxygen does give the struct a comment, but it is below:
I notice it also puts the comment for my /** this is a test field / int a; but I would like it to document that in structure display, like /// does. I don't understand why these are not equivalent, which the doxygen manual implies that it is, that is /* and /// are equivalent doxygen prefix comments.
Thanks for the feedback.