c# Doxygen未正确解析__属性__

zbwhf8kr  于 2023-02-10  发布在  C#
关注(0)|答案(1)|浏览(169)

我用以下方式定义了一些函数:

* @brief   Obtains the current time tick of the OS.
 *          This is a weak function and is intended to be overridden.
 * @return  In the weak version always 0. Otherwise should return the current
 *          OS time tick.
 */
__attribute__((__weak__)) osalUint_t osal_tickGetCurrent(void)
{
    return 0;
}

它们被定义为“弱”,当我用这样的定义为C文件生成doxygen输出时,函数没有被正确解析。

当涉及到函数(以及其他对象,比如struct)时,有没有一种方法可以让Doxygen感知__attribute__

hpxqektj

hpxqektj1#

我使用的源代码:

/// \file

/**
 * @brief   Obtains the current time tick of the OS.
 *          This is a weak function and is intended to be overridden.
 * @return  In the weak version always 0. Otherwise should return the current
 *          OS time tick.
 */
__attribute__((__weak__)) osalUint_t osal_tickGetCurrent(void)
{
    return 0;
}

作为doxygen设置文件(Doxyfile):

QUIET = YES
ENABLE_PREPROCESSING   = YES
MACRO_EXPANSION        = YES
PREDEFINED             = __attribute__(x)=

其结果是:

相关问题