blob: e669fb3d03a4e444435cca7f299882792d68af31 [file] [log] [blame]
David Reiss00dcccf2007-07-21 01:18:10 +00001/*
2thrift -cpp DebugProtoTest.thrift
David Reiss2dc72c32007-08-21 23:59:34 +00003g++ -Wall -g -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \
David Reiss00dcccf2007-07-21 01:18:10 +00004 DebugProtoTest.cpp gen-cpp/DebugProtoTest_types.cpp \
5 ../lib/cpp/.libs/libthrift.a -o DebugProtoTest
6./DebugProtoTest
7*/
8
9cpp_namespace thrift.test
10
11struct OneOfEach {
12 1: bool im_true,
13 2: bool im_false,
14 3: byte a_bite,
15 4: i16 integer16,
16 5: i32 integer32,
17 6: i64 integer64,
18 7: double double_precision,
19 8: string some_characters,
20 9: string zomg_unicode,
21 10: bool what_who,
22}
23
24struct Bonk {
25 1: i32 type,
26 2: string message,
27}
28
29struct Nesting {
30 1: Bonk my_bonk,
31 2: OneOfEach my_ooe,
32}
33
34struct HolyMoley {
35 1: list<OneOfEach> big,
36 2: set<list<string>> contain,
37 3: map<string,list<Bonk>> bonks,
38}
David Reiss382fc302007-08-25 18:01:30 +000039
40struct Backwards {
41 2: i32 first_tag2,
42 1: i32 second_tag1,
43}
44
45struct Empty {
46}
47
48struct Wrapper {
49 1: Empty foo
50}
51
52struct RandomStuff {
53 1: i32 a,
54 2: i32 b,
55 3: i32 c,
56 4: i32 d,
57 5: list<i32> myintlist,
58 6: map<i32,Wrapper> maps,
59 7: i64 bigint,
60 8: double triple,
61}
62
63service Srv {
64 i32 Janky(i32 arg)
65}
David Reiss23753122007-08-27 19:57:34 +000066
67service PartiallyReflectable {
68 map<i32,map<i32,i32>> returnNotReflectable(1: i32 hello),
69 void argNotReflectable(1: list<set<i32>> arg),
70 void arg2NotReflectable(1: i32 arg1, 2: list<set<i32>> argNotReflectable),
71 void withMap(1: map<i32, string> amap),
72
73 OneOfEach refl1(1: list<Bonk> arg1),
74 OneOfEach refl2(2: list<string> arg1, 1: Bonk arg2);
75}
David Reissfaebedd2007-09-17 23:20:38 +000076
77// The only purpose of this thing is to increase the size of the generated code
78// so that ZlibTest has more highly compressible data to play with.
79struct BlowUp {
80 1: map<list<i32>,set<map<i32,string>>> b1;
81 2: map<list<i32>,set<map<i32,string>>> b2;
82 3: map<list<i32>,set<map<i32,string>>> b3;
83 4: map<list<i32>,set<map<i32,string>>> b4;
84}