1
0

struct.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. #ifndef _DOXYGEN_EXAMPLE_STRUCT_H_
  2. #define _DOXYGEN_EXAMPLE_STRUCT_H_
  3. /**
  4. * @page page_howto_struct How to write doxygen documentation for structure.
  5. *
  6. * We recommend the following approach:
  7. *
  8. * A comment block before the structure definition is recommended to
  9. * describe the general information of the structure type. In the
  10. * comment block, a `@brief` is required, other commands (such as `@note`)
  11. * are optional.
  12. *
  13. * If you feel that the description of `@brief` is not enough, you
  14. * can add a detailed description part, which is also optional.
  15. *
  16. * Put member comments inside the structure definition and after every member.
  17. *
  18. * See
  19. * <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>
  20. * for code example.
  21. *
  22. * See
  23. * <a href="./group__group__doxygen__example__struct.html">Doxygen Example of Structure</a>
  24. * for html output.
  25. */
  26. /**
  27. * @defgroup group_doxygen_example_struct Doxygen Example of Structure
  28. *
  29. * @ingroup group_doxygen_example
  30. *
  31. * @brief Doxygen Example of Structure.
  32. *
  33. * @{
  34. */
  35. /**
  36. * @brief Brief description this structure
  37. *
  38. * Detailed description starts here, one line or multiple lines.
  39. * Blah blah blah...
  40. *
  41. * @note This is a note for this structure, blah blah blah...
  42. */
  43. struct dogygen_example_struct
  44. {
  45. int m1; /**< Some documentation for member 'm1'...
  46. * Multiple lines ... Note the "multi-line" here refers
  47. * to the code. Whether it is displayed in multiple lines
  48. * on the specific HTML page depends on the browser rendering.
  49. *
  50. * @note We can also embed note for member 'm1'...
  51. */
  52. int m2; /**< Some documentation for member 'm2'... */
  53. int m3; /**< Some documentation for member 'm3'... */
  54. int m4; /**< Some documentation for member 'm4'... */
  55. int m5; /**< Some documentation for member 'm5'... */
  56. };
  57. /**
  58. * @brief Brief description this structure
  59. *
  60. * Detailed description starts here, one line or multiple lines.
  61. * Blah blah blah...
  62. *
  63. * @note This is a note for this structure, blah blah blah...
  64. */
  65. struct dogygen_example_struct_another
  66. {
  67. int m1; /**< Some documentation for member 'm1'...
  68. * Multiple lines ... Note the "multi-line" here refers
  69. * to the code. Whether it is displayed in multiple lines
  70. * on the specific HTML page depends on the browser rendering.
  71. *
  72. * @note We can also embed note for member 'm1'...
  73. */
  74. int m2; /**< Some documentation for member 'm2'... */
  75. int m3; /**< Some documentation for member 'm3'... */
  76. int m4; /**< Some documentation for member 'm4'... */
  77. int m5; /**< Some documentation for member 'm5'... */
  78. };
  79. /** @} */
  80. #endif /* _DOXYGEN_EXAMPLE_STRUCT_H_ */