Changeset 57833 in vbox
- Timestamp:
- Sep 18, 2015 8:08:10 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 102783
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/VBox-CodingGuidelines.cpp
r53944 r57833 70 70 * - char strings are UTF-8. 71 71 * 72 * - Strings from any external source must be treated with utmost care as 73 * they do not have to be valid UTF-8. Only trust internal strings. 74 * 72 75 * - All functions return VBox status codes. There are three general 73 76 * exceptions from this: … … 93 96 * the platforms. 94 97 * 98 * - The use of symbols leading with single or double underscores is 99 * forbidden as that intrudes on reserved compiler/system namespace. (3) 100 * 95 101 * - All files have file headers with $Id and a file tag which describes 96 102 * the file in a sentence or two. 97 * Note: Remember to enable keyword expansion when adding files to svn. 103 * Note: Use the svn-ps.cmd/svn-ps.sh utility with the -a option to add 104 * new sources with keyword expansion and exporting correctly 105 * configured. 98 106 * 99 107 * - All public functions are fully documented in Doxygen style using the … … 102 110 * 103 111 * - All structures in header files are described, including all their 104 * members. 105 * 106 * - All modules have a documentation ' page' in the main source file which107 * describes the intent and actual implementation.112 * members. (Doxygen style, of course.) 113 * 114 * - All modules have a documentation '\@page' in the main source file 115 * which describes the intent and actual implementation. 108 116 * 109 117 * - Code which is doing things that are not immediately comprehensible … … 116 124 * 117 125 * - Comments on \#else indicates what begins while the comment on a 118 * \#endif indicates what ended. 126 * \#endif indicates what ended. Only add these when there are more than 127 * a few lines (6-10) of \#ifdef'ed code, otherwise they're just clutter. 119 128 * 120 129 * … … 127 136 * __declspect(export) constructs are the main reason for this. 128 137 * OTOH, we do perhaps have a bit too detailed graining of this in VMM... 138 * 139 * (3) There are guys out there grepping public sources for symbols leading with 140 * single and double underscores as well as gotos and other things 141 * considered bad practice. They'll post statistics on how bad our sources 142 * are on some mailing list, forum or similar. 129 143 * 130 144 * … … 274 288 * from typemap-shared.inc.xsl every few KB of output, or xsltproc will 275 289 * end up wasting all the time reallocating the output buffer. 290 * 291 * 292 * @subsection sec_vbox_guideline_compulsory_doxygen Doxygen Comments 293 * 294 * As mentioned above, we shall use doxygen/javadoc style commenting of public 295 * functions, typedefs, classes and such. It is preferred to use this style in 296 * as many places as possible. 297 * 298 * A couple of hints on how to best write doxygen comments: 299 * 300 * - A good class, method, function, structure or enum doxygen comment 301 * starts with a one line sentence giving a brief description of the 302 * item. Details comes in a new paragraph (after blank line). 303 * 304 * - Except for list generators like \@todo, \@cfgm, \@gcfgm and others, 305 * all doxygen comments are related to things in the code. So, for 306 * instance you DO NOT add a doxygen \@note comment in the middle of a 307 * because you've got something important to note, you add a normal 308 * comment like 'Note! blah, very importan blah!' 309 * 310 * - We do NOT use TODO/XXX/BUGBUG or similar markers in the code to flag 311 * things needing fixing later, we always use \@todo doxygen comments. 312 * 313 * - There is no colon after the \@todo. And it is ALWAYS in a doxygen 314 * comment. 315 * 316 * - The \@retval tag is used to explain status codes a method/function may 317 * returns. It is not used to describe output parameters, that is done 318 * using the \@param or \@param[out] tag. 319 * 320 * See https://www.stack.nl/~dimitri/doxygen/manual/index.html for the official 321 * doxygen documention. 276 322 * 277 323 *
Note:
See TracChangeset
for help on using the changeset viewer.