\ includedoc的氧气用量

时间:2017-08-01 07:46:10

标签: doxygen

Doxygen documentation \ includedoc "此命令与 \ include 的工作方式相同,但会包含内容该文件就好像它位于调用此命令的位置一样。"

所以我设置了public class CustomMappingConverter extends AbstractJackson2HttpMessageConverter { public CustomMappingConverter(final ObjectMapper objectMapper){ super(objectMapper, MediaType.APPLICATION_JSON, new MediaType("application", "*+json"), new MediaType("application", "jsonp")); } private String jsonPrefix; public CustomMappingConverter() { this(Jackson2ObjectMapperBuilder.json().build()); } public void setJsonPrefix(final String jsonPrefix) { this.jsonPrefix = jsonPrefix; } public void setPrefixJson(final boolean prefixJson) { jsonPrefix = prefixJson ? ")]}', " : null; } @Override protected void writePrefix(final JsonGenerator generator, final Object object) throws IOException { if (jsonPrefix != null) { generator.writeRaw(jsonPrefix); } final String jsonpFunction = object instanceof MappingJacksonValue ? ((MappingJacksonValue) object).getJsonpFunction() : null; if (jsonpFunction != null) { generator.writeRaw("/**/"); generator.writeRaw(jsonpFunction + "("); } } @Override protected void writeSuffix(final JsonGenerator generator, final Object object) throws IOException { final String jsonpFunction = object instanceof MappingJacksonValue ? ((MappingJacksonValue) object).getJsonpFunction() : null; if (jsonpFunction != null) { generator.writeRaw(");"); } } } (Doxyfile)并在EXAMPLE_PATH = includepages子文件夹中创建了一个名为test.dox的文件。

为确保使用正确,这是includepages

的内容
test.dox

以下是我的方式包含此页面:

/*!
 *  THIS IS A TEST
 */
 THIS IS AN OTHER TEST

这将导致:

Screenshot Doxygen result

如您所见 * \include test.dox * * \includedoc test.dox 的工作方式与预期一致。文件\include test.dox的无doxygen部分被赋予(test.dox)。 但是,而不是打印THIS IS AN OTHER TEST THIS IS A TEST打印文件名? 我无法弄清楚什么是错的。

感谢您的帮助 汤姆

系统信息(SuSE Leap 42.2)

\includedoc test.dox

1 个答案:

答案 0 :(得分:0)

我终于成功使用了最新的Doxygen版本。

这是在Linux上使用Doxygen 1.8.13的快速途径:

wget http://ftp.stack.nl/pub/users/dimitri/doxygen-1.8.13.src.tar.gz
tar xvf doxygen-1.8.13.src.tar.gz 
cd doxygen-1.8.13/
cmake -G "Unix Makefiles"
make
sudo mkdir /opt/doxygen-1.8.13
cp bin/doxygen /opt/doxygen-1.8.13

现在您可以通过调用 /opt/doxygen-1.8.13/doxygen 来调用 doxygen 或您自己的构建版本来选择使用您的分发维护版本。< / p>