我正在使用Doxygen为我正在开发的C#项目生成一些API文档.我在这个项目中有相当多的"内部"功能,并且不希望Doxygen在它生成的生成的html中生成这些签名.
我已尝试启用HIDE_FRIEND_COMPOUNDS,但这仍会导致我的内部类在生成的文档中公开.
有谁知道如何做到这一点?
添加到Mac H的答案,你必须设置这些额外的配置参数,使其工作:
# The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). PREDEFINED = internal=private # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES
这是旧条目,但我遇到了同样的问题。
对我有用的方法是简单地使用doxygen的“预定义”功能。如果您预定义'internal = private'(相当于执行'#define内部私有'),则Doxygen会将所有“ internal”属性视为“ private”,因此如果需要,请忽略它们。
这是一种想法-但行得通。