guide.html: Fix typo.
[official-gcc.git] / libstdc++-v3 / docs / doxygen / guide.html
blob0628521f4275e4b6c1e7149daa434337773b1623
1 <!DOCTYPE html
2 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <head>
6 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
7 <title>Build and Writing Guide for libstdc++-v3 Doxygen</title>
8 <link href="style.css" rel="stylesheet" type="text/css">
9 </head>
11 <body bgcolor="#ffffff">
13 <h1>libstdc++-v3 Source Documentation</h1>
15 <p>This file is docs/doxygen/guide.html in the libstdc++-v3 source tree. It
16 is not included in the generated pages (no real point to doing that).
17 </p>
19 <ul>
20 <li><a href="#creating">Creating the pages</a></li>
21 <li><a href="#writing">Writing the markup</a></li>
22 </ul>
24 <hr />
26 <a name="creating"><h2>Creating the pages</h2></a>
27 <p>The Makefile rules <code>'make doxygen'</code>,
28 <code>'make doxygen-maint'</code>, and <code>'make doxygen-man'</code>
29 in the libstdc++-v3 build directory generate the user-level HTML docs, the
30 maintainer-level HTML docs, and the man pages, respectively. Prerequisite
31 tools are
32 <a href="http://www.doxygen.org/">
33 <!-- snagged from the generated page -->
34 <img src="doxygen.png" alt="Doxygen" align=center border=0 width=110 height=53>
35 </a>, a working version of <code>g++</code> somewhere in the PATH, and
36 the <a href="http://www.gnu.org/software/coreutils/">GNU coreutils</a>.
37 (g++ is used to build a program which manipulates man pages. GNU versions
38 of find, xargs, and possibly sed and grep are used, just because the GNU
39 versions make things very easy.)
40 </p>
42 <p>Careful observers will see that the Makefile rules simply call a script
43 from the source tree, <code>run_doxygen</code>, which does the actual work
44 of running Doxygen and then (most importantly) massaging the output files.
45 If for some reason you prefer to not go through the Makefile, you can call
46 this script directly. (Start by passing <code>'--help'</code>.)
47 </p>
49 <p>If you wish to tweak the Doxygen settings, do so by editing
50 <code>docs/doxygen/user.cfg.in</code>. Notes to v3-hackers are written in
51 triple-# comments.
52 </p>
54 <a name="writing"><h2>Writing the markup</h2></a>
55 <p>In general, libstdc++-v3 files should be formatted according to the GNU
56 C++ Coding Standard rules found in the file
57 <a href="http://gcc.gnu.org/onlinedocs/libstdc++/17_intro/C++STYLE">C++STYLE</a>.
58 Before any doxygen-specific formatting tweaks are made, please try to make
59 sure that the initial formatting is sound.
60 </p>
62 <p>Adding Doxygen markup to a file (informally called "doxygenating") is very
63 simple. The Doxygen manual can be found
64 <a href="http://www.stack.nl/~dimitri/doxygen/download.html#latestman">here</a>.
65 We try to use a very-recent version of Doxygen.
66 </p>
68 <h3>Doxygen style guide</h3>
69 <p>[incomplete and constantly evolving]</p>
71 <p>For classes, use deque/vector/list and std::pair as examples. For
72 functions, see their member functions, and the free functions in
73 <code>stl_algobase.h</code>. Member functions of other container-like
74 types should read similarly to these member functions.
75 </p>
77 <p>These points accompany the first list in section 3.1 of the Doxygen manual:
78 </p>
79 <ol>
80 <li>Use the Javadoc style...</li>
81 <li>...not the Qt style. The intermediate *'s are preferred.</li>
82 <li>Use the triple-slash style only for one-line comments (the "brief" mode).
83 Very recent versions of Doxygen permit full-mode comments in triple-slash
84 blocks, but the formatting still comes out wonky.</li>
85 <li>This is disgusting. Don't do this.</li>
86 </ol>
88 <p>Use the @-style of commands, not the !-style. Please be careful about
89 whitespace in your markup comments. Most of the time it doesn't matter;
90 doxygen absorbs most whitespace, and both HTML and *roff are agnostic about
91 whitespace. However, in &lt;pre&gt; blocks and @code/@endcode sections,
92 spacing can have "interesting" effects.
93 </p>
95 <p>Use either kind of grouping, as appropriate. <code>doxygroups.cc</code>
96 exists for this purpose. See <code>stl_iterator.h</code> for a good
97 example of the "other" kind of grouping.
98 </p>
100 <p>Please use markup tags like @p and @a when referring to things such as the
101 names of function parameters. Use @e for emphasis when necessary. Use @c
102 to refer to other standard names. (Examples of all these abound in the
103 present code.)
104 </p>
106 </body>
107 </html>