浏览代码

doxygen: group examples in subpages

Doxygen examples are grouped on different pages so that you can
easily link to pages of related types in the documentation.
For example, macro examples have their own page, and function
examples have their own page, which correspond to their own code
examples, such as "macro.h" or "function.h".

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
Chen Wang 2 月之前
父节点
当前提交
3c8b23576f

+ 12 - 4
documentation/0.doxygen/example/include/enum.h

@@ -14,15 +14,23 @@
  *
  *
  * See
  * See
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/enum.h">documentation/0.doxygen/example/include/enum.h</a>
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/enum.h">documentation/0.doxygen/example/include/enum.h</a>
- * for example.
+ * for code example.
+ *
+ * See
+ * <a href="./group__group__doxygen__example__enum.html">Doxygen Example of Enumeration</a>
+ * for html output.
  */
  */
 
 
 /**
 /**
- * @addtogroup group_doxygen_example
+ * @defgroup group_doxygen_example_enum Doxygen Example of Enumeration
+ *
+ * @ingroup group_doxygen_example
+ *
+ * @brief Doxygen Example of Enumeration.
+ *
+ * @{
  */
  */
 
 
-/** @{ */
-
 /**
 /**
  * @brief Brief description of this enumeration
  * @brief Brief description of this enumeration
  */
  */

+ 6 - 2
documentation/0.doxygen/example/include/groups.h

@@ -24,14 +24,18 @@
  *
  *
  * See
  * See
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/groups.h">documentation/0.doxygen/example/include/groups.h</a>
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/groups.h">documentation/0.doxygen/example/include/groups.h</a>
- * for example.
+ * for code example.
+ *
+ * See
+ * <a href="./group__group__doxygen__example__sub.html">Doxygen Example of Groups and Sub-Groups</a>
+ * for html output.
  *
  *
  * More information can be found in the Doxygen manual:
  * More information can be found in the Doxygen manual:
  * <a href="https://www.doxygen.nl/manual/grouping.html">Grouping</a>.
  * <a href="https://www.doxygen.nl/manual/grouping.html">Grouping</a>.
  */
  */
 
 
 /**
 /**
- * @defgroup group_doxygen_example_sub Sub Group of Doxygen Example
+ * @defgroup group_doxygen_example_sub Doxygen Example of Groups
  *
  *
  * All members of this group will be displayed in one HTML page.
  * All members of this group will be displayed in one HTML page.
  *
  *

+ 14 - 6
documentation/0.doxygen/example/include/macro.h

@@ -10,7 +10,7 @@
  *   recommend putting documentation after members. See `DOXYGEN_EXAMPLE_CONST_A`
  *   recommend putting documentation after members. See `DOXYGEN_EXAMPLE_CONST_A`
  *   and `DOXYGEN_EXAMPLE_CONST_B` in
  *   and `DOXYGEN_EXAMPLE_CONST_B` in
  *   <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/macro.h">documentation/0.doxygen/example/include/macro.h</a>
  *   <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/macro.h">documentation/0.doxygen/example/include/macro.h</a>
- *   for exmaple.
+ *   for code exmaple.
  *
  *
  * - The other is to define macros with parameters. For this type of
  * - The other is to define macros with parameters. For this type of
  *   macro, we recommend using a method similar to documenting for
  *   macro, we recommend using a method similar to documenting for
@@ -18,15 +18,23 @@
  *   More details please see @ref page_howto_function
  *   More details please see @ref page_howto_function
  *   See `DOXYGEN_EXAMPLE_ABS` in
  *   See `DOXYGEN_EXAMPLE_ABS` in
  *   <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/macro.h">documentation/0.doxygen/example/include/macro.h</a>
  *   <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/macro.h">documentation/0.doxygen/example/include/macro.h</a>
- *   for example.
+ *   for code example.
+ *
+ * See
+ * <a href="./group__group__doxygen__example__macro.html">Doxygen Example of Macro</a>
+ * for html output.
  */
  */
 
 
-/**
- * @addtogroup group_doxygen_example
+ /**
+ * @defgroup group_doxygen_example_macro Doxygen Example of Macro
+ *
+ * @ingroup group_doxygen_example
+ *
+ * @brief Doxygen Example of Macro.
+ *
+ * @{
  */
  */
 
 
-/** @{ */
-
 #define DOXYGEN_EXAMPLE_CONST_A 100 /**< Description of macro const A */
 #define DOXYGEN_EXAMPLE_CONST_A 100 /**< Description of macro const A */
 #define DOXYGEN_EXAMPLE_CONST_B 200 /**< Description of macro const B */
 #define DOXYGEN_EXAMPLE_CONST_B 200 /**< Description of macro const B */
 
 

+ 12 - 4
documentation/0.doxygen/example/include/struct.h

@@ -18,15 +18,23 @@
  *
  *
  * See
  * See
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/struct.h">documentation/0.doxygen/example/include/struct.h</a>
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/struct.h">documentation/0.doxygen/example/include/struct.h</a>
- * for example.
+ * for code example.
+ *
+ * See
+ * <a href="./group__group__doxygen__example__struct.html">Doxygen Example of Structure</a>
+ * for html output.
  */
  */
 
 
 /**
 /**
- * @addtogroup group_doxygen_example
+ * @defgroup group_doxygen_example_struct Doxygen Example of Structure
+ *
+ * @ingroup group_doxygen_example
+ *
+ * @brief Doxygen Example of Structure.
+ *
+ * @{
  */
  */
 
 
-/** @{ */
-
 /**
 /**
  * @brief Brief description this structure
  * @brief Brief description this structure
  *
  *

+ 13 - 5
documentation/0.doxygen/example/include/typedef.h

@@ -26,18 +26,26 @@
  *
  *
  * See
  * See
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/typedef.h">documentation/0.doxygen/example/include/typedef.h</a>
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/typedef.h">documentation/0.doxygen/example/include/typedef.h</a>
- * for example.
+ * for code example.
+ *
+ * See
+ * <a href="./group__group__doxygen__example__typedef.html">Doxygen Example of Typedef</a>
+ * for html output.
  */
  */
 
 
 #include "struct.h"
 #include "struct.h"
 #include "enum.h"
 #include "enum.h"
 
 
 /**
 /**
- * @addtogroup group_doxygen_example
+ * @defgroup group_doxygen_example_typedef Doxygen Example of Typedef
+ *
+ * @ingroup group_doxygen_example
+ *
+ * @brief Doxygen Example of Typedef.
+ *
+ * @{
  */
  */
 
 
-/** @{ */
-
 /**
 /**
  * @typedef dogygen_example_struct_t
  * @typedef dogygen_example_struct_t
  * Alias of `struct dogygen_example_struct`.
  * Alias of `struct dogygen_example_struct`.
@@ -49,7 +57,7 @@ typedef struct dogygen_example_struct dogygen_example_struct_t;
 typedef struct dogygen_example_struct_another dogygen_example_struct_another_t;
 typedef struct dogygen_example_struct_another dogygen_example_struct_another_t;
 
 
 /**
 /**
- * @typedef doxygen_example_enum
+ * @typedef doxygen_example_enum_t
  * Alias of `enum doxygen_example_enum`.
  * Alias of `enum doxygen_example_enum`.
  */
  */
 typedef enum doxygen_example_enum doxygen_example_enum_t;
 typedef enum doxygen_example_enum doxygen_example_enum_t;

+ 12 - 4
documentation/0.doxygen/example/include/union.h

@@ -14,15 +14,23 @@
  *
  *
  * See
  * See
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/union.h">documentation/0.doxygen/example/include/union.h</a>
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/include/union.h">documentation/0.doxygen/example/include/union.h</a>
- * for example.
+ * for code example.
+ *
+ * See
+ * <a href="./group__group__doxygen__example__union.html">Doxygen Example of Union</a>
+ * for html output.
  */
  */
 
 
 /**
 /**
- * @addtogroup group_doxygen_example
+ * @defgroup group_doxygen_example_union Doxygen Example of Union
+ *
+ * @ingroup group_doxygen_example
+ *
+ * @brief Doxygen Example of Union.
+ *
+ * @{
  */
  */
 
 
-/** @{ */
-
 /**
 /**
  * @brief Brief description of this union
  * @brief Brief description of this union
  */
  */

+ 15 - 5
documentation/0.doxygen/example/src/function.c

@@ -43,17 +43,27 @@
  *
  *
  * See
  * See
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/src/function.c">documentation/0.doxygen/example/src/function.c</a>
  * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/src/function.c">documentation/0.doxygen/example/src/function.c</a>
- * for example.
+ * for code example.
  *
  *
- * <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/src/function.h">documentation/0.doxygen/example/src/function.h</a> is an example of the header file where we just declare the API without doxygen documentation.
+ * See
+ * <a href="./group__group__doxygen__example__function.html">Doxygen Example of Function</a>
+ * for html output.
+ *
+ * @note <a href="https://github.com/RT-Thread/rt-thread/blob/master/documentation/0.doxygen/example/src/function.h">documentation/0.doxygen/example/src/function.h</a>
+ * is just an example of the header file where we declare the API without
+ * doxygen documentation.
  */
  */
 
 
 /**
 /**
- * @addtogroup group_doxygen_example
+ * @defgroup group_doxygen_example_function Doxygen Example of Function
+ *
+ * @ingroup group_doxygen_example
+ *
+ * @brief Doxygen Example of Function.
+ *
+ * @{
  */
  */
 
 
-/** @{ */
-
 /**
 /**
  * @brief Brief description for the function
  * @brief Brief description for the function
  *
  *