|
|
|
@ -221,13 +221,13 @@ bool PrivateGenerator::PrintBetaServerFactory( |
|
|
|
|
grpc::string input_message_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_input( |
|
|
|
|
&input_message_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
grpc::string output_message_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_output( |
|
|
|
|
&output_message_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
method_implementation_constructors.insert( |
|
|
|
@ -327,13 +327,13 @@ bool PrivateGenerator::PrintBetaStubFactory( |
|
|
|
|
grpc::string input_message_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_input( |
|
|
|
|
&input_message_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
grpc::string output_message_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_output( |
|
|
|
|
&output_message_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
method_cardinalities.insert( |
|
|
|
@ -432,13 +432,13 @@ bool PrivateGenerator::PrintStub( |
|
|
|
|
grpc::string request_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_input( |
|
|
|
|
&request_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
grpc::string response_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_output( |
|
|
|
|
&response_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
StringMap method_dict; |
|
|
|
@ -523,13 +523,13 @@ bool PrivateGenerator::PrintAddServicerToServer( |
|
|
|
|
grpc::string request_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_input( |
|
|
|
|
&request_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
grpc::string response_module_and_class; |
|
|
|
|
if (!method->get_module_and_message_path_output( |
|
|
|
|
&response_module_and_class, generator_file_name, |
|
|
|
|
generate_in_pb2_grpc)) { |
|
|
|
|
generate_in_pb2_grpc, config.import_prefix)) { |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
StringMap method_dict; |
|
|
|
@ -595,14 +595,18 @@ bool PrivateGenerator::PrintPreamble(grpc_generator::Printer* out) { |
|
|
|
|
auto method = service.get()->method(j); |
|
|
|
|
|
|
|
|
|
grpc::string input_type_file_name = method->get_input_type_name(); |
|
|
|
|
grpc::string input_module_name = ModuleName(input_type_file_name); |
|
|
|
|
grpc::string input_module_alias = ModuleAlias(input_type_file_name); |
|
|
|
|
grpc::string input_module_name = |
|
|
|
|
ModuleName(input_type_file_name, config.import_prefix); |
|
|
|
|
grpc::string input_module_alias = |
|
|
|
|
ModuleAlias(input_type_file_name, config.import_prefix); |
|
|
|
|
imports_set.insert( |
|
|
|
|
std::make_tuple(input_module_name, input_module_alias)); |
|
|
|
|
|
|
|
|
|
grpc::string output_type_file_name = method->get_output_type_name(); |
|
|
|
|
grpc::string output_module_name = ModuleName(output_type_file_name); |
|
|
|
|
grpc::string output_module_alias = ModuleAlias(output_type_file_name); |
|
|
|
|
grpc::string output_module_name = |
|
|
|
|
ModuleName(output_type_file_name, config.import_prefix); |
|
|
|
|
grpc::string output_module_alias = |
|
|
|
|
ModuleAlias(output_type_file_name, config.import_prefix); |
|
|
|
|
imports_set.insert( |
|
|
|
|
std::make_tuple(output_module_name, output_module_alias)); |
|
|
|
|
} |
|
|
|
|