struct.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 example.
  21. */
  22. /**
  23. * @addtogroup group_doxygen_example
  24. */
  25. /** @{ */
  26. /**
  27. * @brief Brief description this structure
  28. *
  29. * Detailed description starts here, one line or multiple lines.
  30. * Blah blah blah...
  31. *
  32. * @note This is a note for this structure, blah blah blah...
  33. */
  34. struct dogygen_example_struct
  35. {
  36. int m1; /**< Some documentation for member 'm1'...
  37. * Multiple lines ... Note the "multi-line" here refers
  38. * to the code. Whether it is displayed in multiple lines
  39. * on the specific HTML page depends on the browser rendering.
  40. *
  41. * @note We can also embed note for member 'm1'...
  42. */
  43. int m2; /**< Some documentation for member 'm2'... */
  44. int m3; /**< Some documentation for member 'm3'... */
  45. int m4; /**< Some documentation for member 'm4'... */
  46. int m5; /**< Some documentation for member 'm5'... */
  47. };
  48. /**
  49. * @brief Brief description this structure
  50. *
  51. * Detailed description starts here, one line or multiple lines.
  52. * Blah blah blah...
  53. *
  54. * @note This is a note for this structure, blah blah blah...
  55. */
  56. struct dogygen_example_struct_another
  57. {
  58. int m1; /**< Some documentation for member 'm1'...
  59. * Multiple lines ... Note the "multi-line" here refers
  60. * to the code. Whether it is displayed in multiple lines
  61. * on the specific HTML page depends on the browser rendering.
  62. *
  63. * @note We can also embed note for member 'm1'...
  64. */
  65. int m2; /**< Some documentation for member 'm2'... */
  66. int m3; /**< Some documentation for member 'm3'... */
  67. int m4; /**< Some documentation for member 'm4'... */
  68. int m5; /**< Some documentation for member 'm5'... */
  69. };
  70. /** @} */
  71. #endif /* _DOXYGEN_EXAMPLE_STRUCT_H_ */