带有占位符的 Doxygen 自定义标签

Doxygen custom tag with a placeholder

是否可以在 Doxygen 中以某种方式创建自定义标签,该标签使用占位符标签作为输入来创建文档?

我想要完成的是为需求创建自定义标签。由于我们的 DOORS Urls 很长,并且从 SW 组件到 SW 组件不同,我想创建类似这样的东西:

@file somefile.c
@doorsdocurl <URL to DOORS document> -> this is going to be my placeholder

...
...
...


/**
* @brief somedescription
* @req{doorsdocurl: <reqID1, reqID2,...> } -> this is going to be the second custom tag
*/
void jambo()
{
}

这是否可以通过 Doxygen 以某种方式实现?根据我的阅读,必须将他的自定义标签放在 ALIASES 变量中

在您的 Doxyfile 中,您需要像这样的东西:

ALIASES = "doorsdocurl_sw_1=<URL to DOORS document>" \
          "req{2}= <br>"

代码如下:

/**
* @brief somedescription
*
* @req{@doorsdocurl_sw_1,reqID1}
* @req{@doorsdocurl_sw_1,reqID2}
*/
void jambo()
{
}

\req 命令当然可以用其他命令扩展,在这方面命令 xrefitem 可能有用,请参阅手册 (http://www.doxygen.nl/manual/commands.html#cmdxrefitem)