gpt4 book ai didi

c# - 带有 C# 内部访问修饰符的 Doxygen

转载 作者:可可西里 更新时间:2023-11-01 08:22:18 25 4
gpt4 key购买 nike

我正在使用 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

关于c# - 带有 C# 内部访问修饰符的 Doxygen,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1862318/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com