Go to the documentation of this file.
19 #ifndef GRPC_INTERNAL_COMPILER_PROTOBUF_PLUGIN_H
20 #define GRPC_INTERNAL_COMPILER_PROTOBUF_PLUGIN_H
31 template <
typename DescriptorType>
52 return method_->input_type()->file()->name();
55 return method_->output_type()->file()->name();
62 const std::vector<std::string>& prefixes_to_filter)
const final {
63 return grpc_python_generator::GetModuleAndMessagePath(
65 import_prefix, prefixes_to_filter);
71 const std::vector<std::string>& prefixes_to_filter)
const final {
72 return grpc_python_generator::GetModuleAndMessagePath(
74 import_prefix, prefixes_to_filter);
78 return !
method_->client_streaming() && !
method_->server_streaming();
98 return grpc_python_generator::get_all_comments(
method_);
113 std::unique_ptr<const grpc_generator::Method>
method(
int i)
const {
114 return std::unique_ptr<const grpc_generator::Method>(
127 return grpc_python_generator::get_all_comments(
service_);
139 void Print(
const std::map<std::string, std::string>& vars,
140 const char* string_template) {
141 printer_.Print(vars, string_template);
171 std::unique_ptr<const grpc_generator::Service>
service(
int i)
const {
172 return std::unique_ptr<const grpc_generator::Service>(
190 return grpc_python_generator::get_all_comments(
file_);
194 vector<std::string> proto_names;
195 for (
int i = 0;
i <
file_->dependency_count(); ++
i) {
197 proto_names.push_back(
dep.name());
206 #endif // GRPC_INTERNAL_COMPILER_PROTOBUF_PLUGIN_H
const grpc::protobuf::ServiceDescriptor * service_
void Print(const char *string)
grpc::protobuf::io::Printer printer_
GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor
std::string generator_file_name
std::string filename() const
const grpc::protobuf::FileDescriptor * file_
std::string filename_without_ext() const
std::string GetPrefixedComments(const DescriptorType *desc, bool leading, const std::string &prefix)
std::unique_ptr< const grpc_generator::Service > service(int i) const
void PrintRaw(const char *string)
std::string GetCommentsHelper(const DescriptorType *desc, bool leading, const std::string &prefix)
bool BidiStreaming() const
GRPC_CUSTOM_PRINTER Printer
std::vector< std::string > package_parts() const
ProtoBufPrinter(std::string *str)
std::vector< std::string > tokenize(const std::string &input, const std::string &delimiters)
std::string GetTrailingComments(const std::string prefix) const
std::string input_type_name() const
std::string output_type_name() const
bool ClientStreaming() const
GRPC_CUSTOM_STRINGOUTPUTSTREAM StringOutputStream
std::string GetTrailingComments(const std::string prefix) const
int service_count() const
bool get_module_and_message_path_input(std::string *str, std::string generator_file_name, bool generate_in_pb2_grpc, std::string import_prefix, const std::vector< std::string > &prefixes_to_filter) const final
bool ServerStreaming() const
vector< std::string > GetAllComments() const
GRPC_CUSTOM_METHODDESCRIPTOR MethodDescriptor
ProtoBufService(const grpc::protobuf::ServiceDescriptor *service)
void Print(const std::map< std::string, std::string > &vars, const char *string_template)
std::string GetLeadingComments(const std::string prefix) const
std::unique_ptr< const grpc_generator::Method > method(int i) const
const grpc::protobuf::MethodDescriptor * method_
std::string package() const
std::unique_ptr< grpc_generator::Printer > CreatePrinter(std::string *str) const
std::string additional_headers() const
bool generate_in_pb2_grpc
std::string GetLeadingComments(const std::string prefix) const
std::string StripProto(std::string filename)
vector< std::string > GetImportNames() const
static const char prefix[]
std::string ClassName(const grpc::protobuf::Descriptor *descriptor, bool qualified)
std::string get_output_type_name() const
ProtoBufFile(const grpc::protobuf::FileDescriptor *file)
std::string GetTrailingComments(const std::string prefix) const
grpc::protobuf::io::StringOutputStream output_stream_
std::string get_input_type_name() const
vector< std::string > GetAllComments() const
bool get_module_and_message_path_output(std::string *str, std::string generator_file_name, bool generate_in_pb2_grpc, std::string import_prefix, const std::vector< std::string > &prefixes_to_filter) const final
std::string GetLeadingComments(const std::string prefix) const
__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod NSString * service
vector< std::string > GetAllComments() const
GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor
ProtoBufMethod(const grpc::protobuf::MethodDescriptor *method)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:00:57