Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
2年前关闭。
Improve this question
我正在使用Doxygen生成用C#编写的API文档。但是,它公开了私有(private)/ protected 成员。有没有办法隐藏那些?
我想出了如何隐藏文件:EXCLUDE =文件名列表
但是,我需要更多的粒度,从而使用户免受不必要的API干扰。一个示例Doxygen文件以及技巧/窍门将不胜感激。
您使用什么工具从源代码生成API?
在18世纪,当我通过C++在C#中使用Doxygen时,我感到有些不安。
可以为各种提取/隐藏代码元素设置许多其他选项,例如,引用
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
2年前关闭。
Improve this question
我正在使用Doxygen生成用C#编写的API文档。但是,它公开了私有(private)/ protected 成员。有没有办法隐藏那些?
我想出了如何隐藏文件:EXCLUDE =文件名列表
但是,我需要更多的粒度,从而使用户免受不必要的API干扰。一个示例Doxygen文件以及技巧/窍门将不胜感激。
您使用什么工具从源代码生成API?
在18世纪,当我通过C++在C#中使用Doxygen时,我感到有些不安。
最佳答案
我不知道Doxygen对C#的支持程度如何。
要隐藏私有(private)成员,请按以下方式更改Doxyfile
配置文件:
EXTRACT_PRIVATE = YES
可以为各种提取/隐藏代码元素设置许多其他选项,例如,引用
Doxyfile
本身:# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
# documentation are documented, even if no documentation was available.
# Private class members and static file members will be hidden unless
# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
EXTRACT_ALL = YES
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
# will be included in the documentation.
EXTRACT_PRIVATE = YES
# If the EXTRACT_STATIC tag is set to YES all static members of a file
# will be included in the documentation.
EXTRACT_STATIC = YES
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
# defined locally in source files will be included in the documentation.
# If set to NO only classes defined in header files are included.
EXTRACT_LOCAL_CLASSES = YES
# This flag is only useful for Objective-C code. When set to YES local
# methods, which are defined in the implementation section but not in
# the interface are included in the documentation.
# If set to NO (the default) only methods in the interface are included.
EXTRACT_LOCAL_METHODS = YES
# If this flag is set to YES, the members of anonymous namespaces will be
# extracted and appear in the documentation as a namespace called
# 'anonymous_namespace{file}', where file will be replaced with the base
# name of the file that contains the anonymous namespace. By default
# anonymous namespace are hidden.
EXTRACT_ANON_NSPACES = NO
# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
# undocumented members of documented classes, files or namespaces.
# If set to NO (the default) these members will be included in the
# various overviews, but no documentation section is generated.
# This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy.
# If set to NO (the default) these classes will be included in the various
# overviews. This option has no effect if EXTRACT_ALL is enabled.
HIDE_UNDOC_CLASSES = NO
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
# friend (class|struct|union) declarations.
# If set to NO (the default) these declarations will be included in the
# documentation.
HIDE_FRIEND_COMPOUNDS = NO
关于c# - Doxygen:隐藏私有(private)/ protected 方法…和技巧,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/562763/