带占位符的Doxygen自定义标记

问题描述 投票:0回答:1

是否有可能在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变量中

c doxygen requirements
1个回答
1
投票

在您的Doxyfile中,您需要以下内容:

ALIASES = "doorsdocurl_sw_1=<URL to DOORS document>" \
          "req{2}=\1 \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

© www.soinside.com 2019 - 2024. All rights reserved.