|
|
|
@ -125,16 +125,23 @@ inline grpc::string LowerUnderscoreToUpperCamel(grpc::string str) { |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline grpc::string FileNameInUpperCamel(const grpc::protobuf::FileDescriptor *file) { |
|
|
|
|
inline grpc::string FileNameInUpperCamel(const grpc::protobuf::FileDescriptor *file, |
|
|
|
|
bool include_package_path) { |
|
|
|
|
std::vector<grpc::string> tokens = tokenize(StripProto(file->name()), "/"); |
|
|
|
|
grpc::string result = ""; |
|
|
|
|
for (unsigned int i = 0; i < tokens.size() - 1; i++) { |
|
|
|
|
result += tokens[i] + "/"; |
|
|
|
|
if (include_package_path) { |
|
|
|
|
for (unsigned int i = 0; i < tokens.size() - 1; i++) { |
|
|
|
|
result += tokens[i] + "/"; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
result += LowerUnderscoreToUpperCamel(tokens.back()); |
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inline grpc::string FileNameInUpperCamel(const grpc::protobuf::FileDescriptor *file) { |
|
|
|
|
return FileNameInUpperCamel(file, true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
enum MethodType { |
|
|
|
|
METHODTYPE_NO_STREAMING, |
|
|
|
|
METHODTYPE_CLIENT_STREAMING, |
|
|
|
|