Author: bryanduxbury
Date: Thu Sep 2 00:43:16 2010
New Revision: 991783
URL: http://svn.apache.org/viewvc?rev=991783&view=rev
Log:
THRIFT-805. cocoa: Don't generate process_XXXX methods for oneway methods
Patch: Brad Taylor
Modified:
incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc
Modified: incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc
URL:
http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc?rev=991783&r1=991782&r2=991783&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc
(original)
+++ incubator/thrift/trunk/compiler/cpp/src/generate/t_cocoa_generator.cc Thu
Sep 2 00:43:16 2010
@@ -1149,7 +1149,11 @@ void t_cocoa_generator::generate_cocoa_s
}
string t_cocoa_generator::function_result_helper_struct_type(t_function*
tfunction) {
- return capitalize(tfunction->get_name()) + "_result";
+ if (tfunction->is_oneway()) {
+ return capitalize(tfunction->get_name());
+ } else {
+ return capitalize(tfunction->get_name()) + "_result";
+ }
}
@@ -1541,6 +1545,9 @@ void t_cocoa_generator::generate_cocoa_s
// generate a process_XXXX method for each service function, which reads
args, calls the service, and writes results
functions = tservice->get_functions();
for (f_iter = functions.begin(); f_iter != functions.end(); ++f_iter) {
+ if ((*f_iter)->is_oneway()) {
+ continue;
+ }
out << endl;
string funname = (*f_iter)->get_name();
out << indent() << "- (void) process_" << funname << "_withSequenceID:
(int32_t) seqID inProtocol: (id<TProtocol>) inProtocol outProtocol:
(id<TProtocol>) outProtocol" << endl;