- Timestamp:
-
10/05/09 16:09:06 (15 years ago)
- Author:
-
Sh
- Comment:
-
Rearranged sections.
Legend:
- Unmodified
- Added
- Removed
- Modified
-
v2
|
v3
|
|
1 | 1 | = Doxygen Recommendations = |
2 | 2 | |
3 | | |
4 | | RTEMS is much older than [http://www.doxygen.org Doxygen] and the documentation in the .h and .inl files was obviously not written with [http://www.stack.nl/~dimitri/doxygen/manual.html Doxygen markup]. In 2007, [wiki:TBR/User/JoelSherrill JoelSherrill] undertook converting the documentation in the .h and .inl files in the RTEMS SuperCore to Doxygen format. As a result of this effort, the Doxygen for the CVS version of the RTEMS SuperCore is now built automatically multiple times per day and made available on the RTEMS Website. In April 2008, [wiki:TBR/User/JoelSherrill JoelSherrill] began to update the Classic API (e.g. cpukit/rtems) .h and .inl files to include [http://www.stack.nl/~dimitri/doxygen/manual.html Doxygen markup]. |
5 | 3 | = Files = |
6 | 4 | |
7 | 5 | You can document a file with the ''@file [filename]'' directive. If you omit the filename Doxygen will use it for the documentation of the file containing this directive. This is the preferred way to document files which can be read by Doxygen. You should not use ''@file name_of_current_file'' to document the current file because this instructs Doxygen to document a file with the filename ''name_of_current_file'' and this is not necessarily the current one and may lead to ambiguity if someone from outside reuses your stuff to generate her documentation. Within one Doxygen run all files are unique and specified by the current Doxyfile. You can define how the generated output of path and filenames looks like in the Doxyfile via the |
8 | 6 | FULL_PATH_NAMES, STRIP_FROM_PATH and STRIP_FROM_INC_PATH options. |
| 7 | = Functions = |
| 8 | |
| 9 | For documentation of function arguments there are basically to ways: The first one uses @param: |
| 10 | {{{ |
| 11 | /** |
| 12 | * Copies bytes from a source memory area to a destination memory area, |
| 13 | * where both areas may not overlap. |
| 14 | * @param[out] dest The memory area to copy to. |
| 15 | * @param[in] src The memory area to copy from. |
| 16 | * @param[in] n The number of bytes to copy. |
| 17 | */ |
| 18 | }}} |
| 19 | |
| 20 | This leads likely to copy&paste within the comment, bloats simple function comments and is not very fluent to read. |
| 21 | |
| 22 | One alternative is this: |
| 23 | {{{ |
| 24 | /** |
| 25 | * Copies @a n bytes from a source memory area @a src to a destination memory |
| 26 | * area @a dest, where both areas may not overlap. |
| 27 | */ |
| 28 | }}} |
| 29 | |
| 30 | The @a indicates that the next word is a function argument and deserves some kind of high-lightning. |
| 31 | = Doxyfile Hints = |
| 32 | |
9 | 33 | = Header Files = |
10 | 34 | |
… |
… |
|
37 | 61 | *.ac=script-comments-only |
38 | 62 | }}} |
39 | | = Assembly Example = |
| 63 | == Assembly Example == |
40 | 64 | |
41 | 65 | {{{ |
… |
… |
|
54 | 78 | }}} |
55 | 79 | You have to put a declaration of this function somewhere in a header file. |
56 | | = Script Example = |
| 80 | == Script Example == |
57 | 81 | |
58 | 82 | {{{ |
… |
… |
|
69 | 93 | AC_INIT([rtems-c-src-lib-libbsp-powerpc-mpc55xxevb],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla]) |
70 | 94 | }}} |
71 | | = Functions = |
72 | | |
73 | | For documentation of function arguments there are basically to ways: The first one uses @param: |
74 | | {{{ |
75 | | /** |
76 | | * Copies bytes from a source memory area to a destination memory area, |
77 | | * where both areas may not overlap. |
78 | | * @param[out] dest The memory area to copy to. |
79 | | * @param[in] src The memory area to copy from. |
80 | | * @param[in] n The number of bytes to copy. |
81 | | */ |
82 | | }}} |
83 | | |
84 | | This leads likely to copy&paste within the comment, bloats simple function comments and is not very fluent to read. |
85 | | |
86 | | One alternative is this: |
87 | | {{{ |
88 | | /** |
89 | | * Copies @a n bytes from a source memory area @a src to a destination memory |
90 | | * area @a dest, where both areas may not overlap. |
91 | | */ |
92 | | }}} |
93 | | |
94 | | The @a indicates that the next word is a function argument and deserves some kind of high-lightning. |
95 | 95 | = GCC Attributes = |
96 | 96 | |
… |
… |
|
103 | 103 | |
104 | 104 | }}} |
105 | | = JAVADOC_AUTOBRIEF and QT_AUTOBRIEF = |
| 105 | = History = |
106 | 106 | |
107 | | We should agree on either NO or YES for both. |
| 107 | RTEMS is much older than [http://www.doxygen.org Doxygen] and the documentation in the .h and .inl files was obviously not written with [http://www.stack.nl/~dimitri/doxygen/manual.html Doxygen markup]. In 2007, [wiki:TBR/User/JoelSherrill JoelSherrill] undertook converting the documentation in the .h and .inl files in the RTEMS SuperCore to Doxygen format. As a result of this effort, the Doxygen for the CVS version of the RTEMS SuperCore is now built automatically multiple times per day and made available on the RTEMS Website. In April 2008, [wiki:TBR/User/JoelSherrill JoelSherrill] began to update the Classic API (e.g. cpukit/rtems) .h and .inl files to include [http://www.stack.nl/~dimitri/doxygen/manual.html Doxygen markup]. |