如何使用Doxygen在C++中记录宏函数,并在非恶意代码的文档中引用它?
更具体地说,我有一个名为"Message"的普通类在Message.H文件中定义,用户可以从中继承以定义自己的消息。在另一个文件("MessageHelpers.H")中,我有一个类似于下面的疯狂宏:
//! Users must call this macro to register their messages...
/*!
...lest they be forced to type all sorts of boring and
error-prone boiler plate code.
blah blah blah... More specific documentation and explanation...
*/
#define REGISTER_MESSAGE_TYPE(MSGTYPE) \
do_some(MSGTYPE); \
seriously(); \
crazy_stuff(MSGTYPE);
在 Message 的文档中,如果 "REGISTER_MESSAGE_TYPE" 这个词能自动变成一个链接并指向我关于宏的文档就太好了。例如://! A cool message class
/*!
Users can inherit from this class to create their own cool messages.
Just be sure to call REGISTER_MESSAGE_TYPE after your class definition!
*/
class Message
{
virtual void doSomeStuff();
};
这个可能吗?