是否有可能在Doxygen中定义类似宏的东西?
我想写一条这样的评论:
/**
\return return_self_reference
*/Doxygen将用我定义的字符串替换return_self_reference。
Doxygen随后会读到的评论是这样的:
/**
\return A reference to the instance that the operator was called on.
*/请注意,尽管我之前称它为宏,但我不想在实际代码中定义C宏或任何类似的东西。
发布于 2018-09-08 16:10:34
对于这些情况,Doxygen有一个配置参数ALIASES。
让我们来看下面的例子:
/** \file
*/
/**
* \return the normal version
*/
int fie0(void);
/**
* \return \str1_repl
*/
int fie1(void);
/**
* \str2_repl
*/
int fie2(void);并在doxygen配置文件中设置以下ALIASES (有关ALIASES的更多可能性,请参阅手册):
ALIASES = "str1_repl=just the text in replacement" \
"str2_repl=\return return and the text in replacement"我们将得到以下结果:

https://stackoverflow.com/questions/52230085
复制相似问题