David Reiss | 2375312 | 2007-08-27 19:57:34 +0000 | [diff] [blame] | 1 | /* |
| 2 | ../compiler/cpp/thrift -cpp DebugProtoTest.thrift |
| 3 | ../compiler/cpp/thrift -cpp StressTest.thrift |
| 4 | g++ -Wall -I../lib/cpp/src -I/usr/local/include/boost-1_33_1 \ |
| 5 | ReflectionTest.cpp \ |
| 6 | gen-cpp/StressTest_types.cpp gen-cpp/DebugProtoTest_types.cpp \ |
| 7 | gen-cpp/Service.cpp gen-cpp/PartiallyReflectable.cpp \ |
| 8 | ../lib/cpp/.libs/libthrift.a -o ReflectionTest |
| 9 | ./ReflectionTest |
| 10 | */ |
| 11 | |
| 12 | #include <iostream> |
| 13 | #include "gen-cpp/PartiallyReflectable.h" |
| 14 | #include "gen-cpp/Service.h" |
| 15 | #include "../lib/cpp/src/protocol/TDebugProtocol.h" |
| 16 | |
| 17 | int main() { |
| 18 | using std::cout; |
| 19 | using std::endl; |
| 20 | |
| 21 | facebook::thrift::reflection::limited::Service srv1; |
| 22 | thrift::test::PartiallyReflectableIf::getStaticLimitedReflection(srv1); |
| 23 | cout << facebook::thrift::ThriftDebugString(srv1) << endl << endl; |
| 24 | |
| 25 | facebook::thrift::reflection::limited::Service srv2; |
| 26 | test::stress::ServiceIf::getStaticLimitedReflection(srv2); |
| 27 | cout << facebook::thrift::ThriftDebugString(srv2) << endl << endl; |
| 28 | |
| 29 | return 0; |
| 30 | } |