Thrift C++ code generation improvements
Summary: Generate classes instead of structs, and put read/write methods inside the class definition. Separate services into uniquely generated files. Separate types header file from types implementation file (read/write methods)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@664777 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift
index c90a507..897d707 100644
--- a/test/ThriftTest.thrift
+++ b/test/ThriftTest.thrift
@@ -81,3 +81,8 @@
Xtruct testMultiException(string arg0, string arg1) throws(Xception err1=1, Xception2 err2)
}
+
+service SecondService
+{
+ void blahBlah()
+}
diff --git a/test/cpp/Makefile.thrift b/test/cpp/Makefile.thrift
index ddd6b2e..374645d 100644
--- a/test/cpp/Makefile.thrift
+++ b/test/cpp/Makefile.thrift
@@ -42,16 +42,16 @@
$(THRIFT) --cpp ../ThriftTest.thrift
server-debug: stubs
- g++ -o TestServer $(DCFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc
+ g++ -o TestServer $(DCFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
client-debug: stubs
- g++ -o TestClient $(DCFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc
+ g++ -o TestClient $(DCFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
server: stubs
- g++ -o TestServer $(CFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc
+ g++ -o TestServer $(CFL) src/TestServer.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
client: stubs
- g++ -o TestClient $(CFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc
+ g++ -o TestClient $(CFL) src/TestClient.cc ./gen-cpp/ThriftTest.cc ./gen-cpp/ThriftTest_types.cc
clean:
rm -fr TestServer TestClient ../cpp-gen