1 <?xml version="1.0" encoding="UTF-8" ?>
2 <!DOCTYPE manualpage SYSTEM "../style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="../style/manual.en.xsl"?>
5 <manualpage metafile="documenting.xml.meta">
6 <relativepath href=".."/>
7 <parentdocument href="./">Developer Documentation</parentdocument>
9 <title>Documenting Apache 2.0</title>
12 <p>Apache 2.0 uses <a href="http://www.doxygen.org/">Doxygen</a> to
13 document the APIs and global variables in the the code. This will explain
14 the basics of how to document using Doxygen.</p>
17 <section id="brief"><title>Brief Description</title>
18 <p>To start a documentation block, use <code>/**</code><br />
19 To end a documentation block, use <code>*/</code></p>
21 <p>In the middle of the block, there are multiple tags we can
25 Description of this functions purpose<br />
26 @param parameter_name description<br />
27 @return description<br />
28 @deffunc signature of the function<br />
31 <p>The <code>deffunc</code> is not always necessary. DoxyGen does not
32 have a full parser in it, so any prototype that use a macro in the
33 return type declaration is too complex for scandoc. Those functions
34 require a <code>deffunc</code>. An example (using &gt; rather
39 * return the final element of the pathname<br />
40 * @param pathname The path to get the final element of<br />
41 * @return the final element of the path<br />
42 * @tip Examples:<br />
43 * <pre><br />
44 * "/foo/bar/gum" -&gt; "gum"<br />
45 * "/foo/bar/gum/" -&gt; ""<br />
46 * "gum" -&gt; "gum"<br />
47 * "wi\\n32\\stuff" -&gt; "stuff"<br />
48 * </pre><br />
49 * @deffunc const char * ap_filename_of_pathname(const char *pathname)<br />
53 <p>At the top of the header file, always include:</p>
56 * @package Name of library header<br />
60 <p>Doxygen uses a new HTML file for each package. The HTML files are named
61 {Name_of_library_header}.html, so try to be concise with your names.</p>
63 <p>For a further discussion of the possibilities please refer to
64 <a href="http://www.doxygen.org/">the Doxygen site</a>.</p>