是否有可能禁用DO2的所有代码检查功能?
我的意思是:移除所有类/函数/变量/等。going收集解析源,同时保持所有文档都显式地标记为源(\page、\subpage、\section、\subsection等),即:所有东西都指向\mainpage和朋友,什么都不属于“名称空间”、“类”和“文件”。
理想情况下,这种选择应该在Doxyfile级别进行,而不是编辑源代码。
这个请求背后的原因是我使用DO2生成我的文档(当然!)我想要生成一个类似于“执行摘要”的东西,其中我解释了各个模块应该做什么,而不需要使用实际的API (更不用说它是如何实现的)。
我目前正在做的只是削减我生产的.pdf,但是这真的很难看,因为索引已经完成了,而且很简单,很多材料都丢失了(我设法把它剪掉了,但是手动做它是“次优”)。
注意:我确实读取了doxygen -g生成的所有Doxyfile,但是我没有发现任何有用的东西;只有ALPHABETICAL_INDEX = NO和LATEX_HIDE_INDICES = YES非常有用。
更新:遵循@albert建议(谢谢!)我试过使用LAYOUT_FILE,但我无法使它工作(这是一个遗憾,因为这似乎正是我所需要的。
我目前的尝试是:
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.5 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
<tab type="modules" visible="no" title="" intro=""/>
<tab type="namespaces" visible="no" title="">
<tab type="namespacelist" visible="no" title="" intro=""/>
<tab type="namespacemembers" visible="no" title="" intro=""/>
</tab>
<tab type="concepts" visible="no" title="">
</tab>
<tab type="interfaces" visible="no" title="">
<tab type="interfacelist" visible="no" title="" intro=""/>
<tab type="interfaceindex" visible="no" title=""/>
<tab type="interfacehierarchy" visible="no" title="" intro=""/>
</tab>
<tab type="classes" visible="no" title="">
<tab type="classlist" visible="no" title="" intro=""/>
<tab type="classindex" visible="no" title=""/>
<tab type="hierarchy" visible="no" title="" intro=""/>
<tab type="classmembers" visible="no" title="" intro=""/>
</tab>
<tab type="structs" visible="no" title="">
<tab type="structlist" visible="no" title="" intro=""/>
<tab type="structindex" visible="no" title=""/>
</tab>
<tab type="exceptions" visible="no" title="">
<tab type="exceptionlist" visible="no" title="" intro=""/>
<tab type="exceptionindex" visible="no" title=""/>
<tab type="exceptionhierarchy" visible="no" title="" intro=""/>
</tab>
<tab type="files" visible="no" title="">
<tab type="filelist" visible="no" title="" intro=""/>
<tab type="globals" visible="no" title="" intro=""/>
</tab>
<tab type="examples" visible="no" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class visible="no">
<briefdescription visible="no"/>
<includes visible="no"/>
<inheritancegraph visible="no"/>
<collaborationgraph visible="no"/>
<memberdecl>
<nestedclasses visible="no" title=""/>
<publictypes title=""/>
<services title=""/>
<interfaces title=""/>
<publicslots title=""/>
<signals title=""/>
<publicmethods title=""/>
<publicstaticmethods title=""/>
<publicattributes title=""/>
<publicstaticattributes title=""/>
<protectedtypes title=""/>
<protectedslots title=""/>
<protectedmethods title=""/>
<protectedstaticmethods title=""/>
<protectedattributes title=""/>
<protectedstaticattributes title=""/>
<packagetypes title=""/>
<packagemethods title=""/>
<packagestaticmethods title=""/>
<packageattributes title=""/>
<packagestaticattributes title=""/>
<properties title=""/>
<events title=""/>
<privatetypes title=""/>
<privateslots title=""/>
<privatemethods title=""/>
<privatestaticmethods title=""/>
<privateattributes title=""/>
<privatestaticattributes title=""/>
<friends title=""/>
<related title="" subtitle=""/>
<membergroups visible="no"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<enums title=""/>
<services title=""/>
<interfaces title=""/>
<constructors title=""/>
<functions title=""/>
<related title=""/>
<variables title=""/>
<properties title=""/>
<events title=""/>
</memberdef>
<allmemberslink visible="no"/>
<usedfiles visible="no"/>
<authorsection visible="no"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace visible="no">
<briefdescription visible="no"/>
<memberdecl>
<nestednamespaces visible="no" title=""/>
<constantgroups visible="no" title=""/>
<interfaces visible="no" title=""/>
<classes visible="no" title=""/>
<concepts visible="no" title=""/>
<structs visible="no" title=""/>
<exceptions visible="no" title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="no"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection visible="no"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept visible="no">
<briefdescription visible="no"/>
<includes visible="no"/>
<definition visible="no" title=""/>
<detaileddescription title=""/>
<authorsection visible="no"/>
</concept>
<!-- Layout definition for a file page -->
<file visible="no">
<briefdescription visible="no"/>
<includes visible="no"/>
<includegraph visible="no"/>
<includedbygraph visible="no"/>
<sourcelink visible="no"/>
<memberdecl>
<interfaces visible="no" title=""/>
<classes visible="no" title=""/>
<structs visible="no" title=""/>
<exceptions visible="no" title=""/>
<namespaces visible="no" title=""/>
<concepts visible="no" title=""/>
<constantgroups visible="no" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
<membergroups visible="no"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<functions title=""/>
<variables title=""/>
</memberdef>
<authorsection/>
</file>
<!-- Layout definition for a group page -->
<group visible="no">
<briefdescription visible="no"/>
<groupgraph visible="no"/>
<memberdecl>
<nestedgroups visible="no" title=""/>
<dirs visible="no" title=""/>
<files visible="no" title=""/>
<namespaces visible="no" title=""/>
<concepts visible="no" title=""/>
<classes visible="no" title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
<membergroups visible="no"/>
</memberdecl>
<detaileddescription title=""/>
<memberdef>
<pagedocs/>
<inlineclasses title=""/>
<defines title=""/>
<typedefs title=""/>
<sequences title=""/>
<dictionaries title=""/>
<enums title=""/>
<enumvalues title=""/>
<functions title=""/>
<variables title=""/>
<signals title=""/>
<publicslots title=""/>
<protectedslots title=""/>
<privateslots title=""/>
<events title=""/>
<properties title=""/>
<friends title=""/>
</memberdef>
<authorsection visible="no"/>
</group>
<!-- Layout definition for a directory page -->
<directory visible="no">
<briefdescription visible="no"/>
<directorygraph visible="no"/>
<memberdecl>
<dirs visible="no"/>
<files visible="no"/>
</memberdecl>
<detaileddescription title=""/>
</directory>
</doxygenlayout>几乎所有的visible属性都设置为"no“。
不幸的是,只有在<navindex> (它确认实际使用了布局文件)中才能实现这一点。否则输出将保持不变。
具体来说,LaTeX输出是完整的,并且与普通输出“非常相似”。
我还试图在visibility="no"上设置一个<class>,但它也没有任何效果。
很可能我错过了什么,但我猜不出是什么。
发布于 2022-06-22 11:12:14
我使用以下脚本获得了部分成功:
#!/bin/bash
set +e
cat > tmp.doxyfile <<EOF
PROJECT_NAME = "My Awesome Project"
QUIET = YES
EXTRACT_ALL = YES
EXTRACT_STATIC = YES
JAVADOC_AUTOBRIEF = YES
RECURSIVE = YES
INPUT = ../src/
EXAMPLE_PATH = ../src/
PLANTUML_JAR_PATH = /usr/local/bin/plantuml.jar
PROJECT_NUMBER = "version in git: $(git describe --always --dirty --long)"
ALPHABETICAL_INDEX = NO
LATEX_HIDE_INDICES = YES
UML_LOOK = YES
EXTRACT_LOCAL_CLASSES = YES
SHOW_HEADERFILE = NO
VERBATIM_HEADERS = NO
FULL_PATH_NAMES = NO
GENERATE_HTML = NO
LAYOUT_FILE = tmp.layout.xml
EOF
cat > tmp.layout.xml <<EOF
<doxygenlayout version="1.0">
<!-- Generated by doxygen 1.9.5 -->
<!-- Navigation index tabs for HTML output -->
<navindex>
<tab type="mainpage" visible="yes" title=""/>
<tab type="pages" visible="yes" title="" intro=""/>
</navindex>
<!-- Layout definition for a class page -->
<class visible="no">
<briefdescription visible="yes"/>
</class>
<!-- Layout definition for a namespace page -->
<namespace visible="no">
<briefdescription visible="yes"/>
</namespace>
<!-- Layout definition for a concept page -->
<concept visible="no">
<briefdescription visible="yes"/>
</concept>
<!-- Layout definition for a file page -->
<file visible="no">
<briefdescription visible="yes"/>
</file>
<!-- Layout definition for a group page -->
<group visible="no">
<briefdescription visible="yes"/>
</group>
<!-- Layout definition for a directory page -->
<directory visible="no">
<briefdescription visible="yes"/>
</directory>
</doxygenlayout>
EOF
rm -r html latex
doxygen tmp.doxyfile
rm tmp.doxyfile tmp.layout.xml
cat > tmp.doxyfile <<EOF
PROJECT_NAME = "My Awesome Project"
QUIET = YES
EXTRACT_ALL = YES
EXTRACT_STATIC = YES
JAVADOC_AUTOBRIEF = YES
RECURSIVE = YES
INPUT = ../src/
EXAMPLE_PATH = ../src/
CALL_GRAPH = YES
PLANTUML_JAR_PATH = /usr/local/bin/plantuml.jar
DISABLE_INDEX = YES
GENERATE_TREEVIEW = YES
GENERATE_LATEX = NO
PROJECT_NUMBER = "version in git: $(git describe --always --dirty --long)"
EOF
doxygen tmp.doxyfile
rm tmp.doxyfile
[ -f doc.zip ] && rm doc.zip
( cd latex && make )>/dev/null && zip -rq doc.zip latex/refman.pdf html/这将创建一个“成熟的”HTML版本和一个“执行摘要”LaTeX版本。这是可以接受的,但仍然不能令人满意,原因有二:
visible属性为我工作的方法。<briefdescription visible="yes"/>,因为否则缺省值会生效。。
几天后,我不会接受我自己的回答,希望有人能想出一个更好的解决办法。
https://stackoverflow.com/questions/72705260
复制相似问题