David Reiss | 00dcccf | 2007-07-21 01:18:10 +0000 | [diff] [blame] | 1 | /* |
| 2 | thrift -cpp DebugProtoTest.thrift |
| 3 | g++ -Wall -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \ |
| 4 | DebugProtoTest.cpp gen-cpp/DebugProtoTest_types.cpp \ |
| 5 | ../lib/cpp/.libs/libthrift.a -o DebugProtoTest |
| 6 | ./DebugProtoTest |
| 7 | */ |
| 8 | |
| 9 | cpp_namespace thrift.test |
| 10 | |
| 11 | struct 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 | |
| 24 | struct Bonk { |
| 25 | 1: i32 type, |
| 26 | 2: string message, |
| 27 | } |
| 28 | |
| 29 | struct Nesting { |
| 30 | 1: Bonk my_bonk, |
| 31 | 2: OneOfEach my_ooe, |
| 32 | } |
| 33 | |
| 34 | struct HolyMoley { |
| 35 | 1: list<OneOfEach> big, |
| 36 | 2: set<list<string>> contain, |
| 37 | 3: map<string,list<Bonk>> bonks, |
| 38 | } |