blob: ba8216d0dd1feedcfc0acf1eea2539f9b7a58231 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
#ifndef _DOXYGEN_EXAMPLE_TYPEDEF_H_
#define _DOXYGEN_EXAMPLE_TYPEDEF_H_
/**
* @page page_howto_typedef How to write doxygen documentation for typedef.
*
* It is recommended to use separate typedef statements rather
* than a combination. That is:
*
* Recommended:
*
* ```c
* struct S { ... };
* typedef struct S S_t;
* ```
*
* Not recommended:
*
* ```c
* typedef struct S { ... } S_t;
* ```
*
* The reason is we found that the former is more readable, and when we
* write comment block with `@typedef`, the latter may
* cause unexpceted behaviour for doxygen (as of version 1.9.1).
*
* 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>
* for code example.
*
* See @ref group_doxygen_example_typedef for html output.
*/
#include "struct.h"
#include "enum.h"
/**
* @defgroup group_doxygen_example_typedef Doxygen Example of Typedef
*
* @ingroup group_doxygen_example
*
* @brief Doxygen Example of Typedef.
*
* @{
*/
/**
* @typedef dogygen_example_struct_t
* Alias of `struct dogygen_example_struct`.
*
* @typedef dogygen_example_struct_another_t
* Alias of `struct dogygen_example_struct_another`.
*/
typedef struct dogygen_example_struct dogygen_example_struct_t;
typedef struct dogygen_example_struct_another dogygen_example_struct_another_t;
/**
* @typedef doxygen_example_enum_t
* Alias of `enum doxygen_example_enum`.
*/
typedef enum doxygen_example_enum doxygen_example_enum_t;
/** @} */
#endif /* _DOXYGEN_EXAMPLE_TYPEDEF_H_ */
|