1 #ifndef _DOXYGEN_EXAMPLE_GROUPS_H_ 2 #define _DOXYGEN_EXAMPLE_GROUPS_H_ 3 4 /** 5 * @page page_howto_groups How to use groups in doxygen documentation. 6 * 7 * Doxygen has three mechanisms to group things together. For RT-Thread 8 * API documentation, we use 'topics' to create new page for each group. 9 * On HTML browser, the topics pages are shown under the "Modules" in the 10 * treeview on the left. 11 * 12 * To define a group, we use `@defgroup` command. The group name should be 13 * prefixed with a "group_", and the group name should be unique. We can 14 * define a group anywhere, not necessarily in the same file as the members 15 * of the group. Generally, we define a group in a header file. 16 * 17 * To make an entity (structure, function etc. or another group) a member of 18 * a speicific group, we can use `@ingroup` command and put the `@ingroup` 19 * command inside its documentation block. 20 * 21 * To avoid putting `@ingroup` commands in the documentation for each member 22 * you can use `@addtogroup` and group members together by the open marker 23 * `@{` before the group and the closing marker `@}` after the group. 24 * 25 * See 26 * <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> 27 * for code example. 28 * 29 * See @ref group_doxygen_example_sub for html output. 30 * 31 * More information can be found in the Doxygen manual: 32 * <a href="https://www.doxygen.nl/manual/grouping.html">Grouping</a>. 33 */ 34 35 /** 36 * @defgroup group_doxygen_example_sub Doxygen Example of Groups 37 * 38 * All members of this group will be displayed in one HTML page. 39 * 40 * @ingroup group_doxygen_example 41 * 42 * @brief Define a sub group of Doxygen Example. 43 */ 44 45 /** 46 * @brief Brief description of this enumeration 47 * 48 * We use `@ingroup` to add this enum to the group_doxygen_example_sub separately. 49 * 50 * @ingroup group_doxygen_example_sub 51 */ 52 enum doxygen_example_enum_2 53 { 54 V1, /**< description for value 1 */ 55 V2, /**< description for value 2 */ 56 }; 57 58 // This entity is not a member of any group. 59 #define DOXYGEN_EXAMPLE_CONST_E 300 /**< Description of macro const D */ 60 61 /** 62 * @addtogroup group_doxygen_example_sub 63 */ 64 65 /** @{ */ 66 67 /* 68 * DOXYGEN_EXAMPLE_CONST_C & DOXYGEN_EXAMPLE_CONST_D are close together, so 69 * we can use `@addtogroup`, `@{` and `@}` to group them together. 70 */ 71 #define DOXYGEN_EXAMPLE_CONST_C 100 /**< Description of macro const C */ 72 #define DOXYGEN_EXAMPLE_CONST_D 200 /**< Description of macro const D */ 73 74 /** @} */ 75 76 #endif /* _DOXYGEN_EXAMPLE_GROUPS_H_ */ 77