我刚刚注意到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。
谢谢!
答案 0 :(得分: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_G
和QT_AUTOBRIEF=NO
的简短描述)。
谢谢!