In Doxygen comments, we often need to use spaces and symbols to describe a structure chart. However, because Doxygen ignores spaces and line breaks by default, the output result is not what we want. Suppose we want to output the following comments:
[Cpp]
/**
* JOIN (exists (select 1 from x3 where x1.id3 = x3.id3)
*/\
* R1 x1
*/
Because Doxygen ignores spaces and line breaks, after being output to html, it will look like the following:
[Cpp]
JOIN (preserve) (exists (select 1 from x3 where x1.id3 = x3.id3)/\ r1 x1
To output data in the original format, you can use either of the following methods:
1. Use html tags <pre>
[Cpp]
/**
* <Pre>
* JOIN (exists (select 1 from x3 where x1.id3 = x3.id3)
*/\
* R1 x1
* </Pre>
*/
In this way, the output becomes
[Cpp]
JOIN (preserve) (exists (select 1 from x3 where x1.id3 = x3.id3)
/\
R1 x1
2. Use Doxygen labels verbatim and endverbatim
[Cpp]
/**
* @ Verbatim
* JOIN (exists (select 1 from x3 where x1.id3 = x3.id3)
*/\
* R1 x1
* @ Endverbatim
*/
Output:
[Cpp]
JOIN (preserve) (exists (select 1 from x3 where x1.id3 = x3.id3)
/\
R1 x1
<Pre> Differences between labels and verbatim.
1. <pre> is the html Tag, And verbatim is the Doxygen tag.
2. <pre> does not affect the Doxygen tag. For example, if the <pre> tag contains the Doxygen tag @ ref, @ ref still points to the reference.
3. The verbatim label is a real verbatim output, so all the Doxygen labels between @ verbatim and @ endverbatim will be invalid.