]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - Doxygen_files/reference1.html
basic architecture for game configuration at runtime. writes out a .game, no sanity...
[xonotic/netradiant.git] / Doxygen_files / reference1.html
1 <div align="center">\r
2 <table width="95%" cellpadding="0" cellspacing="0" border="0">\r
3 <tr><td>\r
4 <a href="../html/index.html">GtkRadiant Doxygen Documentation</a>\r
5 \r
6 <a name="top"></a>\r
7 <h1>Doxygen Quick Reference</h1>\r
8 <hr>\r
9 <p align="left">\r
10 \r
11 <h2>Index</h2>\r
12         <ol>\r
13                 <li><a href="#cs">Commenting styles</a></li>\r
14                 <li><a href="#qts">Qt Style C++ Class Example</a></li>\r
15                 <li><a href="#jds">JavaDoc Style C++ Class Example</a></li>\r
16                 <li><a href="#spt">Special Tags</a></li>\r
17                 <li><a href="#stt">Structural Tags</a></li>\r
18         </ol>\r
19 </p>\r
20 \r
21 <hr>\r
22 <a name="cs"></a>\r
23 <h2>1. Commenting Styles</h2>\r
24 There are two different <i>styles</i> of commenting that doxygen recognises.\r
25 <p align="left">\r
26 Qt Style:<br>\r
27 <code>\r
28 /*!<br>\r
29   .... text ....<br>\r
30 */<br>\r
31 <br>\r
32 </code>\r
33 Qt Style Single line<br>\r
34 <code>\r
35 //! .... one line of text ....<br>\r
36 </code>\r
37 </p>\r
38 \r
39 <p align="left">\r
40 JavaDoc Style:<br>\r
41 <code>\r
42 /**<br>\r
43   * .... text ....<br>\r
44   */<br>\r
45 </code>\r
46 <br>\r
47 JavaDoc Style Single line<br>\r
48 <code>\r
49 /// .... one line of text ....<br>\r
50 </code>\r
51 </p>\r
52 \r
53 <p>\r
54         Doxygen only allows one brief and one detailed description for each declaration/definition.\r
55         If there is a brief description before a declaration, and one before the a definition, only\r
56         the one before the <i>declaration</i> will be used. If the same situation occurs for a detailed\r
57         description the one before the <i>definition</i> is preferred and the one before the declaration will\r
58         be ignored.<br>\r
59         A useful method is to have the brief documentation with the declaration in the header file,\r
60         and the detailed documentation with the definition in the source file.\r
61         <p>\r
62                 <i>Note: Standard C/C++ comments are ignored by doxygen, but will be included in the code listing\r
63                 for that file.  </i>\r
64         </p>\r
65 </p>\r
66 <p align="right"><a href="#top">top</a> </p>\r
67 <hr>\r
68 \r
69 <a name="qts"></a>\r
70 <h2>2. Qt Style C++ Class Example</h2>\r
71 <p>\r
72         Here is an example of a C++ class using Qt Style documentation.<br>\r
73         The IEpair class from include/iepairs.h is used here. The html result of using these comments \r
74         can be found <a href="../example/index.html">here</a>.<br>\r
75         <p>\r
76                 <i>Note: The resulting html was generated from a single file. If it were generated as part of\r
77                 the whole documentation, many of the function names and variables would be hyperlinks to\r
78                 their definitions.</i><br>\r
79         </p>\r
80         <pre>\r
81 //! Virtual class to allow plugin operations on entity pairs\r
82 /*!\r
83   \todo Write more complete documentation for this class so that it's use\r
84   is clear\r
85                         \r
86   An interface to entity keys and key pairs that allows plugins to;\r
87   read and write entity keys and key values, get a key value as a\r
88   vec3_t\r
89 */\r
90 class IEpair\r
91 {\r
92   public:\r
93     //! Increment the number of references to this object\r
94     virtual void IncRef () = 0;\r
95                                 \r
96     //! Decrement the reference count\r
97     virtual void DecRef () = 0;\r
98                                 \r
99     //! Get a vector from a key\r
100     virtual void GetVectorForKey( char* key, vec3_t vec ) = 0;\r
101                                 \r
102     //! Get a float from a key\r
103     virtual float FloatForKey( char *key ) = 0;\r
104                                 \r
105     //! Get a string (char *) from a key\r
106     virtual char* ValueForKey( char *key ) = 0;\r
107                                 \r
108     //! Set a key value to char *value\r
109     /*!\r
110       \param key The (char *) containing the keyname\r
111       \param value The (char *) to set the key value to\r
112     */\r
113     virtual void SetKeyValue( char *key, char *value ) = 0;\r
114                                 \r
115     //! Get a vec3_t for the entities origin\r
116     virtual void GetEntityOrigin( vec3_t vec ) = 0;\r
117                                 \r
118     //! Compute the rotated bounds of the BBox based on "angle" and "angles" keys\r
119     virtual void CalculateRotatedBounds( vec3_t mins, vec3_t maxs ) = 0;\r
120 };\r
121 </pre>\r
122 </p>\r
123 <p>\r
124         <p align="right"><a href="#top">top</a> </p>\r
125         <a name="jds"></a>\r
126         <h2>3. JavaDoc Style C++ Class Example</h2>\r
127 \r
128         The same class documented using JavaDoc Style comments\r
129 <pre>\r
130 /// Virtual class to allow plugin operations on entity pairs\r
131 /**\r
132   * @todo Write more complete documentation for this class so that it's use\r
133   * is clear\r
134   *     \r
135   * An interface to entity keys and key pairs that allows plugins to;\r
136   * read and write entity keys and key values, get a key value as a\r
137   * vec3_t\r
138   */\r
139 class IEpair\r
140 {\r
141   public:\r
142     /// Increment the number of references to this object\r
143     virtual void IncRef () = 0;\r
144                                 \r
145     /// Decrement the reference count\r
146     virtual void DecRef () = 0;\r
147                                 \r
148     /// Get a vector from a key\r
149     virtual void GetVectorForKey( char* key, vec3_t vec ) = 0;\r
150                                 \r
151     /// Get a float from a key\r
152     virtual float FloatForKey( char *key ) = 0;\r
153                                 \r
154     /// Get a string (char *) from a key\r
155     virtual char* ValueForKey( char *key ) = 0;\r
156                                 \r
157     /** Set a key value to char *value\r
158       * @param key The (char *) containing the keyname\r
159       * @param value The (char *) to set the key value to\r
160       */\r
161     virtual void SetKeyValue( char *key, char *value ) = 0;\r
162                                 \r
163     //! Get a vec3_t for the entities origin\r
164     virtual void GetEntityOrigin( vec3_t vec ) = 0;\r
165                                 \r
166     //! Compute the rotated bounds of the BBox based on "angle" and "angles" keys\r
167     virtual void CalculateRotatedBounds( vec3_t mins, vec3_t maxs ) = 0;\r
168 };\r
169 </pre>\r
170 </p>\r
171 <p align="right"><a href="#top">top</a> </p>\r
172 <hr>\r
173 \r
174 <a name="spt"></a>\r
175 <h2>4. Special Tags</h2>\r
176 <p>\r
177         Special tags using the Qt style begin with a " \ ", or using JavaDoc style a " @ " (the two should not be mixed).<br>\r
178         <br>\r
179         <b>Common special tags</b><br>\r
180         <center>\r
181         <table width="90%" cellpadding="4" cellspacing="2" border="0" valign="top">\r
182         <tr><td width="10%" bgcolor="#DDDDDD" align="right">\r
183                 <b>author</b>\r
184         </td><td bgcolor="#DDDDDD">\r
185                 <i>The author or a list of comma separated authors/contributers</i>\r
186         </td></tr><tr><td bgcolor="#CCCCCC" align="right">\r
187                 <b>see</b> \r
188         </td><td bgcolor="#CCCCCC">\r
189                 <i>A reference to another class, class member, function, etc...</i>\r
190         </td></tr><tr><td bgcolor="#DDDDDD" align="right">\r
191                 <b>param</b> \r
192         </td><td bgcolor="#DDDDDD">\r
193                 <i>A description of a specific function argument or parameter</i>\r
194         </td></tr><tr><td bgcolor="#CCCCCC" align="right">\r
195                 <b>return</b>\r
196         </td><td bgcolor="#CCCCCC">\r
197                 <i>A description of the value returned from a function/method</i>\r
198         </td></tr><tr><td bgcolor="#DDDDDD" align="right">\r
199                 <b>bug</b>\r
200         </td><td bgcolor="#DDDDDD">\r
201                 <i>Starts a paragraph where one or more bugs may be listed.</i>\r
202         </td></tr><tr><td bgcolor="#CCCCCC" align="right">\r
203                 <b>note</b>\r
204         </td><td bgcolor="#CCCCCC">\r
205                 <i>Starts a paragraph where a note may be entered.</i>\r
206         </td></tr><tr><td bgcolor="#DDDDDD" align="right">\r
207                 <b>todo</b>\r
208         </td><td bgcolor="#DDDDDD">\r
209                 <i>Starts a paragraph where a TODO item is described.</i><br>\r
210                 Note: All TODO items are collated into a separate todo list, each linking to each other\r
211         </td></tr><tr><td bgcolor="#CCCCCC" align="right">\r
212                 <b>version</b>\r
213         </td><td bgcolor="#CCCCCC">\r
214                 <i>Starts a paragraph where one or more version strings may be entered.</i>\r
215         </td></tr><tr><td bgcolor="#DDDDDD" align="right">\r
216                 <b>warning</b>\r
217         </td><td bgcolor="#DDDDDD">\r
218                 <i>Starts a paragraph where one or more warning messages may be entered.</i>\r
219         </td></tr><tr><td bgcolor="#DDDDDD" align="right">\r
220                 <b>brief</b>\r
221         </td><td bgcolor="#DDDDDD">\r
222                 <i>A single line comment in place of the //! or /// comment.</i>\r
223         </td>\r
224         </tr>   \r
225 </table>\r
226 </center>\r
227 <br>\r
228 <p align="right"><a href="#top">top</a></p>\r
229 <hr>\r
230 <a name="stt"></a>\r
231 <h2>5. Structural Tags</h2>\r
232 <p>\r
233 These are used to document a named object, and are not required to be located near that\r
234 object definition or declaration. This allows the documentation for an object to be located\r
235 anywhere in the doxygen input files. The exception to this rule however, is that these\r
236 documentation blocks cannot be within the body of a function or within C style comment blocks.\r
237 All structural commands are preceded by either a " \ " or a " @ ", depending on the \r
238 documentation style, and require one or more parameters to specify the name of the object\r
239 the description is referring to.<br>\r
240 </p>\r
241 <p>\r
242 An example of the \file structural tag:\r
243 <pre>\r
244 /*! \file iepairs.h\r
245     \brief One line documentation for this file\r
246     \author Author(s)\r
247     Long description of this file\r
248 */\r
249 </pre>\r
250 </p>\r
251 \r
252 <b>Common Structural Tags</b><br><br>\r
253 <center>\r
254 <table width="90%" cellpadding="4" cellspacing="2" border="0" valign="top">\r
255         <tr><td width="10%" bgcolor="#DDDDDD" align="right">\r
256                 <b>class</b>\r
257         </td><td bgcolor="#DDDDDD">\r
258                 <i>Documents a class<br>\r
259                 eg:<code><br>\r
260                 /*! \class IEpair<br>\r
261                 \brief Short description of the IEpair class<br>\r
262                                 <br>            \r
263                 Detailed description of the IEpair class<br>\r
264                 */<br>\r
265                 </code>\r
266                 </i>    \r
267         </td></tr><tr><td bgcolor="#CCCCCC" align="right">\r
268                 <b>def</b>\r
269         </td><td bgcolor="#CCCCCC">\r
270                 <i>Describes a #define<br>\r
271                 eg:<code><br>\r
272                 /*! \def MAX_VALUE The name of the define<br>\r
273                 \brief Description of MAX_VALUE<br>\r
274                 */<br>\r
275                 </code>\r
276                 </i>\r
277         </td></tr><tr><td bgcolor="#DDDDDD" align="right">\r
278                 <b>file</b>\r
279         </td><td bgcolor="#DDDDDD">\r
280                 <i>Describes a file<br>\r
281                 eg:<code><br>\r
282                 /*! \file iepairs.h The name of the file<br>\r
283                     \brief Description of the file iepairs.h<br>\r
284                                 <br>\r
285                                 Details<br>\r
286                 */<br>\r
287                 </code>\r
288                 </i>\r
289         </td></tr><tr><td bgcolor="#CCCCCC" align="right">\r
290                 <b>struct</b>\r
291         </td><td bgcolor="#CCCCCC">\r
292                 <i>Documents a struct<br>\r
293                 eg:<code><br>\r
294                 /*! \struct BTListList_t the name of the struct<br>\r
295                   \brief Description of BTListList_t<br>\r
296                         <br>\r
297                 Details<br>\r
298                 */<br>\r
299                 </code>\r
300                 </i>\r
301         </td></tr><tr><td bgcolor="#DDDDDD" align="right">\r
302                 <b>var</b>\r
303         </td><td bgcolor="#DDDDDD">\r
304                 <i>Documents a typedef, variable or enum value<br>\r
305                 eg:<code><br>\r
306                 /*! \var typedef unsigned int UINT32<br>\r
307                   \brief Short description<br>\r
308                 */<br>\r
309                 </code>\r
310                 </i>\r
311         </td></tr><tr><td bgcolor="#CCCCCC" align="right">\r
312                 <b>fn</b>\r
313         </td><td bgcolor="#CCCCCC">\r
314                 <i>Documents a function</i>\r
315                 eg:<code><br>\r
316                 /*! \fn virtual void IEpair::DecRef() = 0;<br>\r
317                   \brief Short description of this function<br>\r
318                                 <br>\r
319                     Detailed description of this function<br>\r
320                 */<br>\r
321                 </code>\r
322                 </i>\r
323         </td>\r
324         </tr>\r
325 </table>\r
326 </center>\r
327 \r
328 <br>    \r
329 <p align="right"><a href="#top">top</a> </p>\r
330 <hr>\r
331 </td></tr>\r
332 </table>\r
333 </div>\r