]>
Commit | Line | Data |
---|---|---|
80d1f2e4 MA |
1 | # -*- Mode: Python -*- |
2 | # Positive QAPI doc comment tests | |
3 | ||
4 | { 'pragma': { 'doc-required': true } } | |
5 | ||
6 | ## | |
7 | # = Section | |
8 | # | |
9 | # == Subsection | |
10 | # | |
11 | # *strong* _with emphasis_ | |
12 | # @var {in braces} | |
13 | # * List item one | |
14 | # - Two, multiple | |
15 | # lines | |
16 | # | |
17 | # 3. Three | |
18 | # Still in list | |
19 | # | |
20 | # Not in list | |
21 | # - Second list | |
22 | # Note: still in list | |
23 | # | |
24 | # Note: not in list | |
25 | # 1. Third list | |
26 | # is numbered | |
27 | # | |
28 | # - another item | |
29 | # | |
30 | # | example | |
31 | # | multiple lines | |
32 | # | |
33 | # Returns: the King | |
34 | # Since: the first age | |
35 | # Notes: | |
36 | # | |
37 | # 1. Lorem ipsum dolor sit amet | |
38 | # | |
39 | # 2. Ut enim ad minim veniam | |
40 | # | |
41 | # Duis aute irure dolor | |
42 | # | |
43 | # Example: | |
44 | # | |
45 | # -> in | |
46 | # <- out | |
47 | # Examples: | |
48 | # - *verbatim* | |
49 | # - {braces} | |
50 | ## | |
51 | ||
52 | ## | |
53 | # @Enum: | |
80d1f2e4 MA |
54 | # @one: The _one_ {and only} |
55 | # | |
56 | # @two is undocumented | |
57 | ## | |
a35c9bf8 MAL |
58 | { 'enum': 'Enum', 'data': |
59 | [ { 'name': 'one', 'if': 'defined(IFONE)' }, 'two' ], | |
60 | 'if': 'defined(IFCOND)' } | |
80d1f2e4 MA |
61 | |
62 | ## | |
63 | # @Base: | |
64 | # @base1: | |
65 | # the first member | |
66 | ## | |
67 | { 'struct': 'Base', 'data': { 'base1': 'Enum' } } | |
68 | ||
69 | ## | |
70 | # @Variant1: | |
71 | # A paragraph | |
72 | # | |
73 | # Another paragraph (but no @var: line) | |
74 | ## | |
75 | { 'struct': 'Variant1', 'data': { 'var1': 'str' } } | |
76 | ||
77 | ## | |
78 | # @Variant2: | |
79 | ## | |
80 | { 'struct': 'Variant2', 'data': {} } | |
81 | ||
82 | ## | |
83 | # @Object: | |
84 | ## | |
85 | { 'union': 'Object', | |
86 | 'base': 'Base', | |
87 | 'discriminator': 'base1', | |
88 | 'data': { 'one': 'Variant1', 'two': 'Variant2' } } | |
89 | ||
90 | ## | |
91 | # @SugaredUnion: | |
92 | ## | |
93 | { 'union': 'SugaredUnion', | |
94 | 'data': { 'one': 'Variant1', 'two': 'Variant2' } } | |
95 | ||
96 | ## | |
97 | # == Another subsection | |
98 | ## | |
99 | ||
100 | ## | |
101 | # @cmd: | |
102 | # @arg1: the first argument | |
103 | # | |
104 | # @arg2: the second | |
105 | # argument | |
106 | # Note: @arg3 is undocumented | |
107 | # Returns: @Object | |
108 | # TODO: frobnicate | |
109 | # Notes: | |
110 | # - Lorem ipsum dolor sit amet | |
111 | # - Ut enim ad minim veniam | |
112 | # | |
113 | # Duis aute irure dolor | |
114 | # Example: | |
115 | # | |
116 | # -> in | |
117 | # <- out | |
118 | # Examples: | |
119 | # - *verbatim* | |
120 | # - {braces} | |
121 | # Since: 2.10 | |
122 | ## | |
123 | { 'command': 'cmd', | |
124 | 'data': { 'arg1': 'int', '*arg2': 'str', 'arg3': 'bool' }, | |
125 | 'returns': 'Object' } | |
126 | ||
127 | ## | |
128 | # @cmd-boxed: | |
129 | # If you're bored enough to read this, go see a video of boxed cats | |
130 | # Example: | |
131 | # | |
132 | # -> in | |
133 | # | |
134 | # <- out | |
135 | ## | |
136 | { 'command': 'cmd-boxed', 'boxed': true, | |
137 | 'data': 'Object' } |