<-
Apache > HTTP 服务器 > 文档 > 版本 2.4 > 开发者文档

Apache 2.0 文档

可用语言:  en  |  zh-cn 

此翻译可能过期。要了解最近的更改,请阅读英文版。

Apache 2.0 使用 Doxygen 从代码中 生成 API 和全局变量的文档。下面是对使用 Doxygen 生成文档的简介。

top

简要说明

使用 /** 开始文档块
使用 */ 结束文档块

在文档块中,我们可以使用多个标签:

Description of this functions purpose
@param parameter_name description
@return description
@deffunc signature of the function

一般不需要 deffunc 。DoxyGen 没有完整的解析器,所以任何 在返回类型声明中使用宏的原型,都是太复杂了。这些函数就需要使用 deffunc。 例如 (使用 &gt; 而不是 >):

/**
 * return the final element of the pathname
 * @param pathname The path to get the final element of
 * @return the final element of the path
 * @tip Examples:
 * <pre>
 * "/foo/bar/gum" -&gt; "gum"
 * "/foo/bar/gum/" -&gt; ""
 * "gum" -&gt; "gum"
 * "wi\\n32\\stuff" -&gt; "stuff"
 * </pre>
 * @deffunc const char * ap_filename_of_pathname(const char *pathname)
 */

总是在头文件开始包含:

/**
 * @package Name of library header
 */

Doxygen 为每个包生成一个新的 HTML 文件,名字是 {Name_of_library_header}.html,所以请简化名称。

更深入的讨论,请参见 Doxygen 站点

可用语言:  en  |  zh-cn 

top

评论

Notice:
This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Libera.chat, or sent to our mailing lists.