简体   繁体   中英

How to show C++ style include syntax in doxygen

I am putting doxygen comment in my file. When I generat HTML files (using doxygen application) I can see

MyClass Class Reference

#include <myclass.hpp>

Which I want to display like

MyClass Class Reference

#include <MyClass>

I tried various option but no luck. I tried \\file MyClass, but still showing same (above mentioned) line.

Here is doxygen comment

/**
 * \class MyClass
 *
 * \ingroup demo
 *
 * \brief Provide an example
 *
 * This class is meant as an example.  It is not useful by itself
 * rather its usefulness is only a function of how much it helps
 * the reader.  It is in a sense defined by the person who reads it
 * and otherwise does not exist in any real form. 
 *
 * \file MyClass
 *
 * Contact: abc@abc.com
 *
 * Created on: Wed Apr 13 18:39:37 2005
 *
 */

From Doxygen FAQ :

You can also document your class as follows

 /*! \\class MyClassName include.h path/include.h * * Docs for MyClassName */ 

To make doxygen put

#include <path/include.h>

in the documentation of the class MyClassName regardless of the name of the actual header file in which the definition of MyClassName is contained.

So I would try:

/**
* \class MyClass myclass.hpp MyClass
...
*/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM