|
|
|
@ -127,6 +127,12 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Write out a file header.
|
|
|
|
|
::grpc::string file_header = |
|
|
|
|
"// Code generated by gRPC proto compiler. DO NOT EDIT!\n" |
|
|
|
|
"// source: " + |
|
|
|
|
file->name() + "\n\n"; |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
// Generate .pbrpc.h
|
|
|
|
|
|
|
|
|
@ -187,7 +193,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Write(context, file_name + ".pbrpc.h", |
|
|
|
|
PreprocIfNot(kForwardDeclare, imports) + "\n" + |
|
|
|
|
file_header + PreprocIfNot(kForwardDeclare, imports) + "\n" + |
|
|
|
|
PreprocIfNot(kProtocolOnly, system_imports) + "\n" + |
|
|
|
|
class_declarations + "\n" + |
|
|
|
|
PreprocIfNot(kForwardDeclare, class_imports) + "\n" + |
|
|
|
@ -228,8 +234,9 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Write(context, file_name + ".pbrpc.m", |
|
|
|
|
PreprocIfNot(kProtocolOnly, |
|
|
|
|
imports + "\n" + class_imports + "\n" + definitions)); |
|
|
|
|
file_header + |
|
|
|
|
PreprocIfNot(kProtocolOnly, imports + "\n" + class_imports + |
|
|
|
|
"\n" + definitions)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|