Doxygen C预处理器宏文档样式

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

我刚刚注意到Doxygen为C预处理器宏生成文档的方式很有趣。在Doxygen's manual/////!/** */)中创建块注释的三种样式中,只有前两种样式(/////!)将显示文件宏列表的简要描述。

我的问题是:这是设计的吗?我有一个控制它的配置选项?我找不到任何有关Javadoc样式应该与Qt和C ++样式不同的信息。

我尝试使用MULTILINE_CPP_IS_BRIEF配置选项,但没有任何效果。

test.c的

/**
 * @file test.c
 * @brief A test
 */

#include <stdio.h>

/** This is a define that doesn't have a brief explanation on the macro list */
#define DEFINE_A   1 
/// This is another define, it's brief explanation appears on the file's macro list
#define DEFINE_B   2
//! This is another define, it's brief explanation appears on the file's macro list
#define DEFINE_C   3 

#define DEFINE_D   4 /**<  This is a define that doesn't have a brief explanation on the file's macro list */
#define DEFINE_F   4 ///< This is another define, it's brief explanation appears on the file's macro list
#define DEFINE_G   4 //!< This is another define, it's brief explanation appears on the file's macro list

/**
 * A simple test function
 *
 * @param[in] x An integer argument
 * @return always zero
 */
int test_fcn( int x )
{
    return x*x;
}

int main(void)
{
    return test_fcn( 3 );
}

test.h

/** @file */

/**My Preprocessor Macro.*/ 
#define TEST_DEFINE(x) (x*x) 

/**
 * @defgroup TEST_GROUP Test Group
 *
 * @{
 */

/** Test AAA documentation. */
#define TEST_AAA (1)
/** Test BBB documentation. */
#define TEST_BBB (2)
/** Test CCC documentation. */
#define TEST_CCC (3)
/** @} */

的Doxyfile

PROJECT_NAME           = "test"
OUTPUT_DIRECTORY       = doc_out
INPUT                  = test.c test.h
#MULTILINE_CPP_IS_BRIEF = NO
MULTILINE_CPP_IS_BRIEF = YES

我在Windows 7 64位上使用Doxygen 1.8.15。

谢谢!

macros c-preprocessor doxygen
1个回答
0
投票

问得太快了。我正在寻找的选项是JAVADOC_AUTOBRIEF=YES

但是有一件奇怪的事情。这些应该是默认值

JAVADOC_AUTOBRIEF      = NO
QT_AUTOBRIEF           = NO
MULTILINE_CPP_IS_BRIEF = NO

但实际的默认行为是

JAVADOC_AUTOBRIEF      = NO
QT_AUTOBRIEF           = YES
MULTILINE_CPP_IS_BRIEF = YES

如果我在Doxygen文件上使用以下选项:

JAVADOC_AUTOBRIEF      = NO
QT_AUTOBRIEF           = NO
MULTILINE_CPP_IS_BRIEF = NO

我从Javadoc,Qt和C ++样式得到不同的行为,我觉得这是错误的。

谢谢!

P.S:

Doxygen -x针对以下Doxyfile:

PROJECT_NAME           = "test"
OUTPUT_DIRECTORY       = doc_out
INPUT                  = test.c test.h
JAVADOC_AUTOBRIEF      = YES
QT_AUTOBRIEF           = NO
MULTILINE_CPP_IS_BRIEF = NO

得到:

# doxygen.exe -x Doxyfile
# Difference with default Doxyfile 1.8.15
PROJECT_NAME           = test
OUTPUT_DIRECTORY       = doc_out
JAVADOC_AUTOBRIEF      = YES
INPUT                  = test.c \
                         test.h

似乎QT_AUTOBRIEF没有做任何事情(即使在DEFINE_C时我也会对DEFINE_GQT_AUTOBRIEF=NO进行简要描述)。

谢谢!

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