Doxygen outputs according to original comments (retain spaces and line breaks)

Source: Internet
Author: User
Tags doxygen id3

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.