#ifndef GRPC_INTERNAL_COMPILER_GENERATOR_HELPERS_H
#define GRPC_INTERNAL_COMPILER_GENERATOR_HELPERS_H
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <vector>
#include "src/compiler/config.h"
#include "src/compiler/proto_parser_helper.h"
namespace grpc_generator {
inline bool StripSuffix(std::string* filename, const std::string& suffix) { … }
inline bool StripPrefix(std::string* name, const std::string& prefix) { … }
inline std::string StripProto(std::string filename) { … }
inline std::string StringReplace(std::string str, const std::string& from,
const std::string& to, bool replace_all) { … }
inline std::string StringReplace(std::string str, const std::string& from,
const std::string& to) { … }
inline std::vector<std::string> tokenize(const std::string& input,
const std::string& delimiters) { … }
inline std::string CapitalizeFirstLetter(std::string s) { … }
inline std::string LowercaseFirstLetter(std::string s) { … }
inline std::string LowerUnderscoreToUpperCamel(std::string str) { … }
inline std::string FileNameInUpperCamel(
const grpc::protobuf::FileDescriptor* file, bool include_package_path) { … }
inline std::string FileNameInUpperCamel(
const grpc::protobuf::FileDescriptor* file) { … }
enum MethodType { … };
inline MethodType GetMethodType(
const grpc::protobuf::MethodDescriptor* method) { … }
inline void Split(const std::string& s, char ,
std::vector<std::string>* append_to) { … }
enum CommentType { … };
template <typename DescriptorType>
inline void GetComment(const DescriptorType* desc, CommentType type,
std::vector<std::string>* out) { … }
template <>
inline void GetComment(const grpc::protobuf::FileDescriptor* desc,
CommentType type, std::vector<std::string>* out) { … }
inline std::string GenerateCommentsWithPrefix(
const std::vector<std::string>& in, const std::string& prefix) { … }
template <typename DescriptorType>
inline std::string GetPrefixedComments(const DescriptorType* desc, bool leading,
const std::string& prefix) { … }
}
#endif