I will study the document generation function of the vccompiler cl.exe.

Source: Internet
Author: User
Tags doxygen
When I checked the help document of cl.exe installed on my computer through vs, I found a/DOC option in it. I can generate a document by commenting. So I tested it for a moment:
Cl.exe/Doc "OBJ/myclass. xdc"/FO "OBJ/myclass. OBJ" src/myclass. cpp

The comments starting with // in the source code are extracted as documents. The specific identifiers are the same as those in C #, for example:
/// <Summary>
/// As a document comment
/// </Summary>
Class myclass
{

};

The generated xdcfile contains an XML file of 8 bytes. You can use xdcmake.exe to compile the xdc file into an XML file:
Xdcmake.exe/out: "myclass. xml" myclass. xdc
The compiled XML file is also UTF-8 encoded, And the content is almost the same as the xdc file (it seems that the order is changed, it seems meaningless to do this compilation ).

I believe that ndoc and other tools can convert XML into CHM files.

Compared with doxygen, cl.exe has the following features:
1. The tag format is the same as that of C #.ProgramBut the number of tags is far behind that of doxygen;
2. The document generation tool converts the C ++ type to the C # type !!! It seems that this function is only available from the C # compiler, and is not customized for C ++.

Doxygen is still supported for free advertising once.
 

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.