4 * Seriously, this is the documentation for this whole program.
7 java_package thrift.test
8 cpp_namespace thrift.test
13 # the new unix comment
15 /** Some doc text goes here. Wow I am [nesting these] (no more nesting.) */
19 /** This is how to document a parameter */
22 /** And this is a doc for a parameter that has no specific value assigned */
31 /** This is how you would do a typedef doc */
34 /** And this is where you would document a struct */
38 /** And the members of a struct */
39 1: string string_thing
41 /** doct text goes before a comma */
49 * You can document constants now too. Yeehaw!
51 const i32 INT32CONSTANT = 9853
52 const i16 INT16CONSTANT = 1616
53 /** Everyone get in on the docu-action! */
54 const map<string,string> MAPCONSTANT = {'hello':'world', 'goodnight':'moon'}
59 2: Xtruct struct_thing,
63 /** Struct insanity */
67 /** This is doc for field 1 */
68 1: map<Numberz, UserId> userMap,
70 /** And this is doc for field 2 */
71 2: list<Xtruct> xtructs
81 2: Xtruct struct_thing
94 /** This is where you would document a Service */
98 /** And this is how you would document functions in a service */
100 string testString(1: string thing),
101 byte testByte(1: byte thing),
102 i32 testI32(1: i32 thing),
105 i64 testI64(1: i64 thing),
106 double testDouble(1: double thing),
107 Xtruct testStruct(1: Xtruct thing),
108 Xtruct2 testNest(1: Xtruct2 thing),
109 map<i32,i32> testMap(1: map<i32,i32> thing),
110 set<i32> testSet(1: set<i32> thing),
111 list<i32> testList(1: list<i32> thing),
113 /** This is an example of a function with params documented */
116 /** This param is a thing */
121 UserId testTypedef(1: UserId thing),
123 map<i32,map<i32,i32>> testMapMap(1: i32 hello),
125 /* So you think you've got this all worked, out eh? */
126 map<UserId, map<Numberz,Insanity>> testInsanity(1: Insanity argument),
130 /// This style of Doxy-comment doesn't work.
131 typedef i32 SorryNoGo
134 * This is a trivial example of a multiline docstring.
136 typedef i32 TrivialMultiLine
139 * This is the cannonical example
140 * of a multiline docstring.
142 typedef i32 StandardMultiLine
145 * The last line is non-blank.
146 * I said non-blank! */
149 /** Both the first line
151 * and the last line */
152 typedef i32 FirstAndLastLine
156 * The text is less indented.
158 typedef i32 IndentedTitle
160 /** First line indented.
161 * Unfortunately, this does not get indented.
163 typedef i32 FirstLineIndent
167 * void code_in_comment() {
168 * printf("hooray code!");
171 typedef i32 CodeInComment
174 * Indented Docstring.
175 * This whole docstring is indented.
176 * This line is indented further.
178 typedef i32 IndentedDocstring
180 /** Irregular docstring.
181 * We will have to punt
183 typedef i32 Irregular1
191 typedef i32 Irregular2
200 No stars in this one.
201 It should still work fine, though.
206 /** Trailing whitespace
207 Sloppy trailing whitespace
209 typedef i32 TrailingWhitespace
214 * We'll have some blank lines in it.
216 * void as_well_as(some code) {
226 typedef i32 TotallyDegenerate