Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
311 views
in Technique[技术] by (71.8m points)

Hexadecimal value of c++ enum in doxygen documentation

i have some problem with doxygen documentation.

I want to have something like

E_SOME_ERROR | 0x000001 Detailed info about this error

Important think is that I need values generated by doxygen but I can't find any solution. Do you guys know if this is possible?

So for example

/**
 * @brief Enum with error codes.
 */
enum enumName
{
    ONE, /**< {HEX value} - 1st number */
    TWO, /**< {HEX value} - 2nd number */
    THREE, /**< {HEX value} - 3rd number */
    FOUR, /**< {HEX value} - 4th number */
}

Should be generated in pdf like:

--------------------------------
| ONE    | 0x0001 - 1st number |
--------------------------------
| TWO    | 0x0002 - 2nd number |
--------------------------------
| THREE  | 0x0003 - 3rd number |
--------------------------------
| FOUR   | 0x0004 - 4th number |
--------------------------------

And each {HEX value} have to be generated by some macro or something like this not hardcoded.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...